aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/attr.rs
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:57:19 +0100
committerMaan2003 <[email protected]>2021-06-13 04:57:19 +0100
commit705f7e6e2644bf5de4255bc05ea8d9d5027c29b0 (patch)
tree1bf26189989bb871a86ec4ee612c978be5e5f883 /crates/hir_def/src/attr.rs
parent6cc6dee9e96d55dbbd8593523551a9981a691147 (diff)
clippy::clone_on_copy
Diffstat (limited to 'crates/hir_def/src/attr.rs')
-rw-r--r--crates/hir_def/src/attr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs
index d9f9fadc1..2b21cf927 100644
--- a/crates/hir_def/src/attr.rs
+++ b/crates/hir_def/src/attr.rs
@@ -606,7 +606,7 @@ pub struct DocsRangeMap {
606impl DocsRangeMap { 606impl DocsRangeMap {
607 pub fn map(&self, range: TextRange) -> Option<InFile<TextRange>> { 607 pub fn map(&self, range: TextRange) -> Option<InFile<TextRange>> {
608 let found = self.mapping.binary_search_by(|(probe, ..)| probe.ordering(range)).ok()?; 608 let found = self.mapping.binary_search_by(|(probe, ..)| probe.ordering(range)).ok()?;
609 let (line_docs_range, idx, original_line_src_range) = self.mapping[found].clone(); 609 let (line_docs_range, idx, original_line_src_range) = self.mapping[found];
610 if !line_docs_range.contains_range(range) { 610 if !line_docs_range.contains_range(range) {
611 return None; 611 return None;
612 } 612 }