diff --git a/repline/src/editor.rs b/repline/src/editor.rs index 6cecd9a..a8e19d1 100644 --- a/repline/src/editor.rs +++ b/repline/src/editor.rs @@ -302,7 +302,7 @@ impl<'a> Editor<'a> { } } -impl<'a, 'e> IntoIterator for &'e Editor<'a> { +impl<'e> IntoIterator for &'e Editor<'_> { type Item = &'e char; type IntoIter = std::iter::Chain< std::collections::vec_deque::Iter<'e, char>, @@ -313,7 +313,7 @@ impl<'a, 'e> IntoIterator for &'e Editor<'a> { } } -impl<'a> Display for Editor<'a> { +impl Display for Editor<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { use std::fmt::Write; for c in self.iter() { diff --git a/repline/src/iter.rs b/repline/src/iter.rs index 4af50bc..b57af60 100644 --- a/repline/src/iter.rs +++ b/repline/src/iter.rs @@ -39,7 +39,7 @@ pub mod chars { if cont & 0xc0 != 0x80 { return None; } - out = out << 6 | (cont & 0x3f); + out = (out << 6) | (cont & 0x3f); } Some(char::from_u32(out).ok_or(BadUnicode(out))) }