aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/display
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-25 06:27:07 +0100
committerGitHub <[email protected]>2019-09-25 06:27:07 +0100
commit6bac2d0a637a6d0b3922a6f8fe05fa32d6d43b15 (patch)
treec3c2af75fa7be376506bf0ffe23fe8cad9c6c402 /crates/ra_ide_api/src/display
parentc7420ddaaa76741d1eebe393406b38ba5596e54a (diff)
parent9c45a9e58632966984a79e18aa5221efb65e0ead (diff)
Merge #1904
1904: Remove redundant `clone()` r=matklad a=sinkuu Co-authored-by: Shotaro Yamada <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r--crates/ra_ide_api/src/display/navigation_target.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs
index 11f73ccfd..d3e774bd0 100644
--- a/crates/ra_ide_api/src/display/navigation_target.rs
+++ b/crates/ra_ide_api/src/display/navigation_target.rs
@@ -304,7 +304,7 @@ impl NavigationTarget {
304 304
305pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> { 305pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
306 let parse = db.parse(symbol.file_id); 306 let parse = db.parse(symbol.file_id);
307 let node = symbol.ptr.to_node(parse.tree().syntax()).to_owned(); 307 let node = symbol.ptr.to_node(parse.tree().syntax());
308 308
309 visitor() 309 visitor()
310 .visit(|it: ast::FnDef| it.doc_comment_text()) 310 .visit(|it: ast::FnDef| it.doc_comment_text())
@@ -326,7 +326,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option
326/// e.g. `struct Name`, `enum Name`, `fn Name` 326/// e.g. `struct Name`, `enum Name`, `fn Name`
327pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> { 327pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
328 let parse = db.parse(symbol.file_id); 328 let parse = db.parse(symbol.file_id);
329 let node = symbol.ptr.to_node(parse.tree().syntax()).to_owned(); 329 let node = symbol.ptr.to_node(parse.tree().syntax());
330 330
331 visitor() 331 visitor()
332 .visit(|node: ast::FnDef| node.short_label()) 332 .visit(|node: ast::FnDef| node.short_label())