aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs2
-rw-r--r--crates/ide/src/doc_links.rs4
-rw-r--r--crates/ide/src/goto_definition.rs2
-rw-r--r--crates/ide/src/syntax_highlighting/inject.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs
index cbfc66ab3..2f840909c 100644
--- a/crates/ide/src/diagnostics/fixes.rs
+++ b/crates/ide/src/diagnostics/fixes.rs
@@ -180,7 +180,7 @@ fn missing_record_expr_field_fix(
180 let def_id = sema.resolve_variant(record_lit)?; 180 let def_id = sema.resolve_variant(record_lit)?;
181 let module; 181 let module;
182 let def_file_id; 182 let def_file_id;
183 let record_fields = match VariantDef::from(def_id) { 183 let record_fields = match def_id {
184 VariantDef::Struct(s) => { 184 VariantDef::Struct(s) => {
185 module = s.module(sema.db); 185 module = s.module(sema.db);
186 let source = s.source(sema.db)?; 186 let source = s.source(sema.db)?;
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs
index 461e11060..5ea9fc4fb 100644
--- a/crates/ide/src/doc_links.rs
+++ b/crates/ide/src/doc_links.rs
@@ -93,7 +93,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
93 93
94 let mut cb = |_: BrokenLink| { 94 let mut cb = |_: BrokenLink| {
95 let empty = InlineStr::try_from("").unwrap(); 95 let empty = InlineStr::try_from("").unwrap();
96 Some((CowStr::Inlined(empty.clone()), CowStr::Inlined(empty))) 96 Some((CowStr::Inlined(empty), CowStr::Inlined(empty)))
97 }; 97 };
98 let doc = Parser::new_with_broken_link_callback(markdown, opts, Some(&mut cb)); 98 let doc = Parser::new_with_broken_link_callback(markdown, opts, Some(&mut cb));
99 let doc = doc.filter_map(move |evt| match evt { 99 let doc = doc.filter_map(move |evt| match evt {
@@ -147,7 +147,7 @@ fn get_doc_link(db: &RootDatabase, definition: Definition) -> Option<String> {
147 _ => return None, 147 _ => return None,
148 }; 148 };
149 149
150 let ns = ItemInNs::from(target_def.clone()); 150 let ns = ItemInNs::from(target_def);
151 151
152 let module = definition.module(db)?; 152 let module = definition.module(db)?;
153 let krate = module.krate(); 153 let krate = module.krate();
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index 6986477a5..b71f4917c 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -102,7 +102,7 @@ fn extract_positioned_link_from_comment(
102 None => comment_range.end(), 102 None => comment_range.end(),
103 } 103 }
104 })?; 104 })?;
105 Some((def_link.to_string(), ns.clone())) 105 Some((def_link.to_string(), *ns))
106} 106}
107 107
108fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> { 108fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> {
diff --git a/crates/ide/src/syntax_highlighting/inject.rs b/crates/ide/src/syntax_highlighting/inject.rs
index 8cdc3688f..4f825523c 100644
--- a/crates/ide/src/syntax_highlighting/inject.rs
+++ b/crates/ide/src/syntax_highlighting/inject.rs
@@ -56,7 +56,7 @@ pub(super) fn ra_fixture(
56 for range in inj.map_range_up(hl_range.range) { 56 for range in inj.map_range_up(hl_range.range) {
57 if let Some(range) = literal.map_range_up(range) { 57 if let Some(range) = literal.map_range_up(range) {
58 hl_range.range = range; 58 hl_range.range = range;
59 hl.add(hl_range.clone()); 59 hl.add(hl_range);
60 } 60 }
61 } 61 }
62 } 62 }