From 705f7e6e2644bf5de4255bc05ea8d9d5027c29b0 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:27:19 +0530 Subject: clippy::clone_on_copy --- crates/hir/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir/src') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index f6eb23262..bd923cba8 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -452,7 +452,7 @@ impl Module { } pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option { - self.id.def_map(db.upcast())[self.id.local_id].scope.visibility_of(def.clone().into()) + self.id.def_map(db.upcast())[self.id.local_id].scope.visibility_of((*def).into()) } pub fn diagnostics( -- cgit v1.2.3