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 /crates/ra_project_model/src/cargo_workspace.rs | |
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 'crates/ra_project_model/src/cargo_workspace.rs')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 22d226a74..4fea459d5 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -164,7 +164,7 @@ impl CargoWorkspace { | |||
164 | // FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures` | 164 | // FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures` |
165 | // https://github.com/oli-obk/cargo_metadata/issues/79 | 165 | // https://github.com/oli-obk/cargo_metadata/issues/79 |
166 | meta.features(CargoOpt::NoDefaultFeatures); | 166 | meta.features(CargoOpt::NoDefaultFeatures); |
167 | } else if cargo_features.features.len() > 0 { | 167 | } else if !cargo_features.features.is_empty() { |
168 | meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone())); | 168 | meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone())); |
169 | } | 169 | } |
170 | if let Some(parent) = cargo_toml.parent() { | 170 | if let Some(parent) = cargo_toml.parent() { |
@@ -197,7 +197,7 @@ impl CargoWorkspace { | |||
197 | let pkg_data = &mut packages[pkg]; | 197 | let pkg_data = &mut packages[pkg]; |
198 | pkg_by_id.insert(id, pkg); | 198 | pkg_by_id.insert(id, pkg); |
199 | for meta_tgt in meta_pkg.targets { | 199 | for meta_tgt in meta_pkg.targets { |
200 | let is_proc_macro = meta_tgt.kind.as_slice() == &["proc-macro"]; | 200 | let is_proc_macro = meta_tgt.kind.as_slice() == ["proc-macro"]; |
201 | let tgt = targets.alloc(TargetData { | 201 | let tgt = targets.alloc(TargetData { |
202 | pkg, | 202 | pkg, |
203 | name: meta_tgt.name, | 203 | name: meta_tgt.name, |