diff options
author | Shotaro Yamada <[email protected]> | 2019-09-25 02:32:01 +0100 |
---|---|---|
committer | Shotaro Yamada <[email protected]> | 2019-09-25 02:32:01 +0100 |
commit | 9c45a9e58632966984a79e18aa5221efb65e0ead (patch) | |
tree | c3c2af75fa7be376506bf0ffe23fe8cad9c6c402 /crates/ra_ide_api/src/diagnostics.rs | |
parent | 7e0fa715329571da8d5d551b1815303c39cf51c1 (diff) |
Remove redundant clone()
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 1ae152e5b..93e1e7c2d 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -86,7 +86,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> | |||
86 | fix: Some(fix), | 86 | fix: Some(fix), |
87 | }) | 87 | }) |
88 | }); | 88 | }); |
89 | let source_file = db.parse(file_id).tree().to_owned(); | 89 | let source_file = db.parse(file_id).tree(); |
90 | let src = | 90 | let src = |
91 | hir::Source { file_id: file_id.into(), ast: hir::ModuleSource::SourceFile(source_file) }; | 91 | hir::Source { file_id: file_id.into(), ast: hir::ModuleSource::SourceFile(source_file) }; |
92 | if let Some(m) = hir::Module::from_definition(db, src) { | 92 | if let Some(m) = hir::Module::from_definition(db, src) { |