From 4858a3784d8a6863f4711615a426acfdb7391c54 Mon Sep 17 00:00:00 2001 From: Johann Hemmann Date: Fri, 19 Jan 2024 16:03:30 +0100 Subject: [PATCH] op_ref --- Cargo.toml | 1 - crates/hir-def/src/lib.rs | 4 +--- crates/load-cargo/src/lib.rs | 2 +- crates/project-model/src/cargo_workspace.rs | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 989662db1451..4086b1245415 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -179,7 +179,6 @@ needless_doctest_main = "allow" new_without_default = "allow" non_canonical_clone_impl = "allow" non_canonical_partial_ord_impl = "allow" -op_ref = "allow" option_map_unit_fn = "allow" partialeq_to_none = "allow" ptr_arg = "allow" diff --git a/crates/hir-def/src/lib.rs b/crates/hir-def/src/lib.rs index bcd1f37bec4a..adf070fe7da9 100644 --- a/crates/hir-def/src/lib.rs +++ b/crates/hir-def/src/lib.rs @@ -733,9 +733,7 @@ pub struct InTypeConstLoc { impl PartialEq for InTypeConstLoc { fn eq(&self, other: &Self) -> bool { - self.id == other.id - && self.owner == other.owner - && &*self.expected_ty == &*other.expected_ty + self.id == other.id && self.owner == other.owner && *self.expected_ty == *other.expected_ty } } diff --git a/crates/load-cargo/src/lib.rs b/crates/load-cargo/src/lib.rs index 6c65e6a04fc1..3878e20a2a63 100644 --- a/crates/load-cargo/src/lib.rs +++ b/crates/load-cargo/src/lib.rs @@ -358,7 +358,7 @@ fn expander_to_proc_macro( proc_macro_api::ProcMacroKind::Attr => ProcMacroKind::Attr, }; let expander: sync::Arc = - if dummy_replace.iter().any(|replace| &**replace == name) { + if dummy_replace.iter().any(|replace| **replace == name) { match kind { ProcMacroKind::Attr => sync::Arc::new(IdentityExpander), _ => sync::Arc::new(EmptyExpander), diff --git a/crates/project-model/src/cargo_workspace.rs b/crates/project-model/src/cargo_workspace.rs index 66da084b49b8..361f8721a4ec 100644 --- a/crates/project-model/src/cargo_workspace.rs +++ b/crates/project-model/src/cargo_workspace.rs @@ -368,7 +368,7 @@ impl CargoWorkspace { name, root: AbsPathBuf::assert(src_path.into()), kind: TargetKind::new(&kind), - is_proc_macro: &*kind == ["proc-macro"], + is_proc_macro: *kind == ["proc-macro"], required_features, }); pkg_data.targets.push(tgt);