From d2c29f012ef16c1da8382ca3416f2ebb96bccc8b Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 13 Sep 2023 20:44:50 +0700 Subject: [PATCH] Remove useless calls to `into_iter()`. (#2474) The `splice()` call takes `IntoIterator`, so calling `into_iter()` is not needed. --- src/block.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/block.rs b/src/block.rs index ba4c95ab3a..b375132ef7 100644 --- a/src/block.rs +++ b/src/block.rs @@ -75,9 +75,8 @@ impl Block { pub fn splice + 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 { #[cfg(feature = "span")]