Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaye committed Mar 16, 2023
1 parent 28f9460 commit 0f9e723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions runtime/src/scheduler/assembly_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ where
trace!("Assembling bank {}", inst_name);

let mut sub = (0..bank_width)
.into_iter()
.map(|i| self.assemble_sub(inst_name, Some(i), arg_maker(i)))
.collect::<Result<Vec<Sub>, _>>()?;

Expand Down Expand Up @@ -431,7 +430,6 @@ impl<S: ReactorInitializer> ComponentCreator<'_, '_, S> {
self.graph().record_port_bank(bank_id, len)?;
Ok(Multiport::new(
(0..len)
.into_iter()
.map(|i| self.new_port_bank_component(lf_name, kind, bank_id, i))
.collect(),
bank_id,
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/triggers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl TriggerId {
/// Returns `Err` on overflow.
pub(crate) fn iter_next_range(&self, len: usize) -> Result<impl Iterator<Item = Self>, ()> {
if let Some(upper) = self.0.checked_add(1 + (len as TriggerIdImpl)) {
Ok(((self.0 + 1)..upper).into_iter().map(TriggerId))
Ok(((self.0 + 1)..upper).map(TriggerId))
} else {
Err(())
}
Expand All @@ -132,7 +132,7 @@ impl TriggerId {
}

pub(crate) fn iter_range(range: &Range<TriggerId>) -> impl Iterator<Item = TriggerId> {
(range.start.0..range.end.0).into_iter().map(TriggerId)
(range.start.0..range.end.0).map(TriggerId)
}
}

Expand Down

0 comments on commit 0f9e723

Please sign in to comment.