Skip to content

Commit

Permalink
Remove useless calls to into_iter(). (#2474)
Browse files Browse the repository at this point in the history
The `splice()` call takes `IntoIterator`, so calling `into_iter()` is not needed.
  • Loading branch information
waywardmonkeys authored Sep 13, 2023
1 parent 79c5cb2 commit d2c29f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ impl Block {

pub fn splice<R: RangeBounds<usize> + Clone>(&mut self, range: R, other: Self) {
#[cfg(feature = "span")]
self.span_info
.splice(range.clone(), other.span_info.into_iter());
self.body.splice(range, other.body.into_iter());
self.span_info.splice(range.clone(), other.span_info);
self.body.splice(range, other.body);
}
pub fn span_iter(&self) -> impl Iterator<Item = (&Statement, &Span)> {
#[cfg(feature = "span")]
Expand Down

0 comments on commit d2c29f0

Please sign in to comment.