@@ -127,15 +127,12 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
127127 }
128128 . run ( ) ?;
129129
130- let installed_extensions = {
131- let output = Cmd {
132- unix : & format ! ( r"{} --list-extensions" , code_binary) ,
133- windows : & format ! ( r"cmd.exe /c {}.cmd --list-extensions" , code_binary) ,
134- work_dir : "." ,
135- }
136- . run_with_output ( ) ?;
137- String :: from_utf8 ( output. stdout ) ?
138- } ;
130+ let installed_extensions = Cmd {
131+ unix : & format ! ( r"{} --list-extensions" , code_binary) ,
132+ windows : & format ! ( r"cmd.exe /c {}.cmd --list-extensions" , code_binary) ,
133+ work_dir : "." ,
134+ }
135+ . run_with_output ( ) ?;
139136
140137 if !installed_extensions. contains ( "rust-analyzer" ) {
141138 anyhow:: bail!(
@@ -161,12 +158,10 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> {
161158
162159fn install_server ( opts : ServerOpt ) -> Result < ( ) > {
163160 let mut old_rust = false ;
164- if let Ok ( output) = run_with_output ( "cargo --version" , "." ) {
165- if let Ok ( stdout) = String :: from_utf8 ( output. stdout ) {
166- println ! ( "{}" , stdout) ;
167- if !check_version ( & stdout, REQUIRED_RUST_VERSION ) {
168- old_rust = true ;
169- }
161+ if let Ok ( stdout) = run_with_output ( "cargo --version" , "." ) {
162+ println ! ( "{}" , stdout) ;
163+ if !check_version ( & stdout, REQUIRED_RUST_VERSION ) {
164+ old_rust = true ;
170165 }
171166 }
172167
0 commit comments