Skip to content

Commit

Permalink
Remove one unnecessary allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
pooyamb committed Jan 30, 2023
1 parent 487da0c commit 64497ce
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions schemer/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 64497ce

Please sign in to comment.