mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Remove redundant clone()
This commit is contained in:
parent
7e0fa71532
commit
9c45a9e586
14 changed files with 21 additions and 29 deletions
|
@ -86,7 +86,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
|
|||
fix: Some(fix),
|
||||
})
|
||||
});
|
||||
let source_file = db.parse(file_id).tree().to_owned();
|
||||
let source_file = db.parse(file_id).tree();
|
||||
let src =
|
||||
hir::Source { file_id: file_id.into(), ast: hir::ModuleSource::SourceFile(source_file) };
|
||||
if let Some(m) = hir::Module::from_definition(db, src) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue