Unnamed repository; edit this file 'description' to name the repository.
fix clippy errors
dfireBird 4 months ago
parent aab4071 · commit 159e7f4
-rw-r--r--crates/rust-analyzer/src/lsp/to_proto.rs2
-rw-r--r--crates/rust-analyzer/src/target_spec.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/lsp/to_proto.rs b/crates/rust-analyzer/src/lsp/to_proto.rs
index ae1861985e..64476338b5 100644
--- a/crates/rust-analyzer/src/lsp/to_proto.rs
+++ b/crates/rust-analyzer/src/lsp/to_proto.rs
@@ -1595,7 +1595,7 @@ pub(crate) fn runnable(
environment,
cwd: cwd.into(),
program: program.to_string(),
- args: args.to_vec().into_iter().chain(executable_args).collect(),
+ args: args.iter().cloned().chain(executable_args).collect(),
}),
}),
_ => None,
diff --git a/crates/rust-analyzer/src/target_spec.rs b/crates/rust-analyzer/src/target_spec.rs
index dbe48f3134..6d05efd75b 100644
--- a/crates/rust-analyzer/src/target_spec.rs
+++ b/crates/rust-analyzer/src/target_spec.rs
@@ -239,7 +239,7 @@ impl CargoTargetSpec {
let replace_placeholders = |arg| match &spec {
Some(spec) if arg == "${package}" => spec.package.clone(),
- Some(spec) if arg == "${target_arg}" => target_arg(spec.target_kind).to_string(),
+ Some(spec) if arg == "${target_arg}" => target_arg(spec.target_kind).to_owned(),
Some(spec) if arg == "${target}" => spec.target.clone(),
_ => arg,
};