mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Invert condition to unindent code
This commit is contained in:
parent
086f1c4b30
commit
700a3d5d75
1 changed files with 159 additions and 160 deletions
|
@ -874,7 +874,9 @@ impl ModCollector<'_, '_> {
|
|||
|
||||
for &item in items {
|
||||
let attrs = self.item_tree.attrs(item.into());
|
||||
if self.is_cfg_enabled(attrs) {
|
||||
if !self.is_cfg_enabled(attrs) {
|
||||
continue;
|
||||
}
|
||||
let module =
|
||||
ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id };
|
||||
let container = ContainerId::ModuleId(module);
|
||||
|
@ -911,9 +913,7 @@ impl ModCollector<'_, '_> {
|
|||
let container = ContainerId::ModuleId(module);
|
||||
let impl_id = ImplLoc { container, id: ItemTreeId::new(self.file_id, imp) }
|
||||
.intern(self.def_collector.db);
|
||||
self.def_collector.def_map.modules[self.module_id]
|
||||
.scope
|
||||
.define_impl(impl_id)
|
||||
self.def_collector.def_map.modules[self.module_id].scope.define_impl(impl_id)
|
||||
}
|
||||
ModItem::Function(id) => {
|
||||
let func = &self.item_tree[id];
|
||||
|
@ -1054,7 +1054,6 @@ impl ModCollector<'_, '_> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn collect_module(&mut self, module: &Mod, attrs: &Attrs) {
|
||||
let path_attr = attrs.by_key("path").string_value();
|
||||
|
|
Loading…
Reference in a new issue