aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/diagnostics
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
committerMaan2003 <[email protected]>2021-06-13 04:54:16 +0100
commitc9b4ac5be4daaabc062ab1ee663eba8594750003 (patch)
tree6090c8c38c735875c916255920525cf5fff45c75 /crates/rust-analyzer/src/diagnostics
parentd6737e55fb49d286b5e646f57975b27b2c95ce92 (diff)
clippy::redudant_borrow
Diffstat (limited to 'crates/rust-analyzer/src/diagnostics')
-rw-r--r--crates/rust-analyzer/src/diagnostics/to_proto.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/diagnostics/to_proto.rs b/crates/rust-analyzer/src/diagnostics/to_proto.rs
index 82dd0da9a..8594d923c 100644
--- a/crates/rust-analyzer/src/diagnostics/to_proto.rs
+++ b/crates/rust-analyzer/src/diagnostics/to_proto.rs
@@ -224,7 +224,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
224 224
225 let mut message = rd.message.clone(); 225 let mut message = rd.message.clone();
226 for child in &rd.children { 226 for child in &rd.children {
227 let child = map_rust_child_diagnostic(config, workspace_root, &child); 227 let child = map_rust_child_diagnostic(config, workspace_root, child);
228 match child { 228 match child {
229 MappedRustChildDiagnostic::SubDiagnostic(sub) => { 229 MappedRustChildDiagnostic::SubDiagnostic(sub) => {
230 subdiagnostics.push(sub); 230 subdiagnostics.push(sub);
@@ -268,7 +268,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
268 primary_spans 268 primary_spans
269 .iter() 269 .iter()
270 .flat_map(|primary_span| { 270 .flat_map(|primary_span| {
271 let primary_location = primary_location(config, workspace_root, &primary_span); 271 let primary_location = primary_location(config, workspace_root, primary_span);
272 272
273 let mut message = message.clone(); 273 let mut message = message.clone();
274 if needs_primary_span_label { 274 if needs_primary_span_label {
@@ -298,7 +298,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
298 // generated that code. 298 // generated that code.
299 let is_in_macro_call = i != 0; 299 let is_in_macro_call = i != 0;
300 300
301 let secondary_location = location(config, workspace_root, &span); 301 let secondary_location = location(config, workspace_root, span);
302 if secondary_location == primary_location { 302 if secondary_location == primary_location {
303 continue; 303 continue;
304 } 304 }