From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- crates/ide/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ide/src/lib.rs') diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 97c9e5d2b..0511efae3 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -282,20 +282,20 @@ impl Analysis { file_id: FileId, text_range: Option, ) -> Cancellable { - self.with_db(|db| syntax_tree::syntax_tree(&db, file_id, text_range)) + self.with_db(|db| syntax_tree::syntax_tree(db, file_id, text_range)) } pub fn view_hir(&self, position: FilePosition) -> Cancellable { - self.with_db(|db| view_hir::view_hir(&db, position)) + self.with_db(|db| view_hir::view_hir(db, position)) } pub fn view_item_tree(&self, file_id: FileId) -> Cancellable { - self.with_db(|db| view_item_tree::view_item_tree(&db, file_id)) + self.with_db(|db| view_item_tree::view_item_tree(db, file_id)) } /// Renders the crate graph to GraphViz "dot" syntax. pub fn view_crate_graph(&self) -> Cancellable> { - self.with_db(|db| view_crate_graph::view_crate_graph(&db)) + self.with_db(|db| view_crate_graph::view_crate_graph(db)) } pub fn expand_macro(&self, position: FilePosition) -> Cancellable> { @@ -315,7 +315,7 @@ impl Analysis { /// up minor stuff like continuing the comment. /// The edit will be a snippet (with `$0`). pub fn on_enter(&self, position: FilePosition) -> Cancellable> { - self.with_db(|db| typing::on_enter(&db, position)) + self.with_db(|db| typing::on_enter(db, position)) } /// Returns an edit which should be applied after a character was typed. @@ -331,7 +331,7 @@ impl Analysis { if !typing::TRIGGER_CHARS.contains(char_typed) { return Ok(None); } - self.with_db(|db| typing::on_char_typed(&db, position, char_typed)) + self.with_db(|db| typing::on_char_typed(db, position, char_typed)) } /// Returns a tree representation of symbols in the file. Useful to draw a -- cgit v1.2.3