Remove useless calls to into_iter(). (#2474)

The `splice()` call takes `IntoIterator`, so calling `into_iter()` is not needed.
This commit is contained in:
Bruce Mitchener
2023-09-13 20:44:50 +07:00
committed by GitHub
parent 79c5cb2d04
commit d2c29f012e

View File

@@ -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")]