Simplify
This commit is contained in:
parent
2b61be2975
commit
0d9f97166b
@ -18,7 +18,7 @@
|
||||
ConstId, HasModule, ImplId, LocalModuleId, MacroId, ModuleDefId, ModuleId, TraitId,
|
||||
};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) enum ImportType {
|
||||
Glob,
|
||||
Named,
|
||||
@ -302,13 +302,13 @@ macro_rules! check_changed {
|
||||
$changed = true;
|
||||
}
|
||||
Entry::Occupied(mut entry)
|
||||
if $glob_imports.$field.contains(&$lookup)
|
||||
&& matches!($def_import_type, ImportType::Named) =>
|
||||
if matches!($def_import_type, ImportType::Named) =>
|
||||
{
|
||||
cov_mark::hit!(import_shadowed);
|
||||
$glob_imports.$field.remove(&$lookup);
|
||||
entry.insert(fld);
|
||||
$changed = true;
|
||||
if $glob_imports.$field.remove(&$lookup) {
|
||||
cov_mark::hit!(import_shadowed);
|
||||
entry.insert(fld);
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user