clean up passes code

This commit is contained in:
Evan Almloff committed 2023-02-07 21:14:58 -06:00
1 parent a720507094
commit 997986ecf6
1 file changed
+5 -5
+5 -5
View File
@@ -54,12 +54,12 @@ pub struct DirtyNodeStates {
impl DirtyNodeStates {
pub fn with_passes(passes: impl Iterator<Item = TypeId>) -> Self {
let mut dirty = FxHashMap::default();
for pass in passes {
dirty.insert(pass, RwLock::new(BTreeMap::new()));
}
Self {
dirty: Arc::new(dirty),
dirty: Arc::new(
passes
.map(|pass| (pass, RwLock::new(BTreeMap::new())))
.collect(),
),
}
}