This commit is contained in:
Johann Hemmann 2024-01-19 16:03:30 +01:00
parent 0df30499d0
commit 4858a3784d
4 changed files with 3 additions and 6 deletions

View File

@ -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"

View File

@ -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
}
}

View File

@ -358,7 +358,7 @@ fn expander_to_proc_macro(
proc_macro_api::ProcMacroKind::Attr => ProcMacroKind::Attr,
};
let expander: sync::Arc<dyn ProcMacroExpander> =
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),

View File

@ -368,7 +368,7 @@ pub fn new(mut meta: cargo_metadata::Metadata) -> 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);