From 10be0b030e110a6b0d3b5e8c82c9bc991119177c Mon Sep 17 00:00:00 2001 From: Sugs Date: Sat, 22 Sep 2018 18:33:32 -0400 Subject: [PATCH] Refactoring. --- rust/rope/src/rope.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/rope/src/rope.rs b/rust/rope/src/rope.rs index 7d66fd5aa..a0c5583e5 100644 --- a/rust/rope/src/rope.rs +++ b/rust/rope/src/rope.rs @@ -758,8 +758,7 @@ impl<'a> From<&'a Rope> for String { impl fmt::Display for Rope { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut ci = self.iter_chunks(..); - for s in ci.next() { + for s in self.iter_chunks(..) { write!(f, "{}", s)?; } Ok(())