From c92c5a78e6333b6025131c031c6466413e60e442 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 13 Jan 2024 21:05:59 -0800 Subject: Apply some clippy suggestions. --- src/rope.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rope.rs') diff --git a/src/rope.rs b/src/rope.rs index f22d103..01867f8 100644 --- a/src/rope.rs +++ b/src/rope.rs @@ -164,7 +164,7 @@ impl Rope { b.children[(MAX_CHILDREN + 1) / 2..MAX_CHILDREN - 1] .iter() .cloned() - .chain([child1, child2].into_iter()), + .chain([child1, child2]), ), ); } @@ -172,7 +172,7 @@ impl Rope { b.children[..b.children.len() - 1] .iter() .cloned() - .chain([child1, child2].into_iter()), + .chain([child1, child2]), )); } } @@ -351,7 +351,7 @@ impl Rope { if c < ' ' || c == '\x7f' { let b = u8::try_from(c).expect("c should be less than \\x7f"); write!(w, "\x1b[36m^{}\x1b[m", char::from(b ^ 0x40))?; - } else if '\u{80}' <= c && c <= '\u{9f}' { + } else if ('\u{80}'..='\u{9f}').contains(&c) { write!(w, "\x1b[36m<{:x}>\x1b[m", u32::from(c))?; } else { write!(w, "{}", c)?; -- cgit v1.3.1