Skip to content

Commit e799dbe

Browse files
author
Jonas Schievink
committed
Simplify iterator chain
1 parent 7474a42 commit e799dbe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/hir_def/src/item_scope.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,12 @@ impl ItemScope {
270270

271271
/// Marks everything that is not a procedural macro as private to `this_module`.
272272
pub(crate) fn censor_non_proc_macros(&mut self, this_module: ModuleId) {
273-
for vis in self
274-
.types
273+
self.types
275274
.values_mut()
276275
.chain(self.values.values_mut())
277276
.map(|(_, v)| v)
278277
.chain(self.unnamed_trait_imports.values_mut())
279-
{
280-
*vis = Visibility::Module(this_module);
281-
}
278+
.for_each(|vis| *vis = Visibility::Module(this_module));
282279

283280
for (mac, vis) in self.macros.values_mut() {
284281
if let MacroDefKind::ProcMacro(_) = mac.kind {

0 commit comments

Comments
 (0)