mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Remove redundant clone()
This commit is contained in:
parent
7e0fa71532
commit
9c45a9e586
14 changed files with 21 additions and 29 deletions
|
@ -304,7 +304,7 @@ impl NavigationTarget {
|
|||
|
||||
pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
let parse = db.parse(symbol.file_id);
|
||||
let node = symbol.ptr.to_node(parse.tree().syntax()).to_owned();
|
||||
let node = symbol.ptr.to_node(parse.tree().syntax());
|
||||
|
||||
visitor()
|
||||
.visit(|it: ast::FnDef| it.doc_comment_text())
|
||||
|
@ -326,7 +326,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option
|
|||
/// e.g. `struct Name`, `enum Name`, `fn Name`
|
||||
pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option<String> {
|
||||
let parse = db.parse(symbol.file_id);
|
||||
let node = symbol.ptr.to_node(parse.tree().syntax()).to_owned();
|
||||
let node = symbol.ptr.to_node(parse.tree().syntax());
|
||||
|
||||
visitor()
|
||||
.visit(|node: ast::FnDef| node.short_label())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue