Skip to content

Commit

Permalink
Remove one unnecessary allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
pooyamb authored and str4d committed Oct 15, 2024
1 parent d9fac27 commit 2724f43
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions schemerz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,11 @@ where
.induced_stream(to.clone(), EdgeDirection::Outgoing)
.map_err(MigratorError::Dependency)?;
if let Some(sink_id) = to {
target_idxs = target_idxs
.into_iter()
.filter(|idx| {
self.id_map
.get(&sink_id)
.expect("Id is checked in induced_stream and exists")
!= idx
})
.collect();
target_idxs.remove(
self.id_map
.get(&sink_id)
.expect("Id is checked in induced_stream and exists"),
);
}

let applied_migrations = self.adapter.applied_migrations()?;
Expand Down

0 comments on commit 2724f43

Please sign in to comment.