diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-18 14:37:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-18 14:37:34 +0000 |
commit | cecf25b72f2af84fc1535cf52d6f3c1b52802565 (patch) | |
tree | 37c8dde0a459caacae6629da08d86be270469ef5 /xtask/src | |
parent | eab80cd961919b9321e1d34343ae3f3adb0502e5 (diff) | |
parent | f6816c253b96e8436f1156d6bd6b0942ee9fb4d3 (diff) |
Merge #3220
3220: Fix clippy warnings, update Cargo.toml versions r=matklad a=SomeoneToIgnore
In the `cargo xtask lint` ouptut, there were two interesting Clippy warnings that might be interesting to investigate further:
* warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
* warning: large size difference between variants
Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/install.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs index cc6fecc85..3df021acc 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs | |||
@@ -94,8 +94,7 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { | |||
94 | }) | 94 | }) |
95 | }; | 95 | }; |
96 | 96 | ||
97 | let installed_extensions; | 97 | let installed_extensions = if cfg!(unix) { |
98 | if cfg!(unix) { | ||
99 | run!("npm --version").context("`npm` is required to build the VS Code plugin")?; | 98 | run!("npm --version").context("`npm` is required to build the VS Code plugin")?; |
100 | run!("npm install")?; | 99 | run!("npm install")?; |
101 | 100 | ||
@@ -103,7 +102,7 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { | |||
103 | 102 | ||
104 | let code = find_code(|bin| run!("{} --version", bin).is_ok())?; | 103 | let code = find_code(|bin| run!("{} --version", bin).is_ok())?; |
105 | run!("{} --install-extension rust-analyzer.vsix --force", code)?; | 104 | run!("{} --install-extension rust-analyzer.vsix --force", code)?; |
106 | installed_extensions = run!("{} --list-extensions", code; echo = false)?; | 105 | run!("{} --list-extensions", code; echo = false)? |
107 | } else { | 106 | } else { |
108 | run!("cmd.exe /c npm --version") | 107 | run!("cmd.exe /c npm --version") |
109 | .context("`npm` is required to build the VS Code plugin")?; | 108 | .context("`npm` is required to build the VS Code plugin")?; |
@@ -113,8 +112,8 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { | |||
113 | 112 | ||
114 | let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?; | 113 | let code = find_code(|bin| run!("cmd.exe /c {}.cmd --version", bin).is_ok())?; |
115 | run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?; | 114 | run!(r"cmd.exe /c {}.cmd --install-extension rust-analyzer.vsix --force", code)?; |
116 | installed_extensions = run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)?; | 115 | run!("cmd.exe /c {}.cmd --list-extensions", code; echo = false)? |
117 | } | 116 | }; |
118 | 117 | ||
119 | if !installed_extensions.contains("rust-analyzer") { | 118 | if !installed_extensions.contains("rust-analyzer") { |
120 | bail!( | 119 | bail!( |