repline: fix operator precedence bug, clippy lints

This commit is contained in:
John 2025-01-16 20:29:43 -06:00
parent 1bd9c021dd
commit e419c23769
2 changed files with 3 additions and 3 deletions

View File

@ -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 Item = &'e char;
type IntoIter = std::iter::Chain< type IntoIter = std::iter::Chain<
std::collections::vec_deque::Iter<'e, char>, 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 { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use std::fmt::Write; use std::fmt::Write;
for c in self.iter() { for c in self.iter() {

View File

@ -39,7 +39,7 @@ pub mod chars {
if cont & 0xc0 != 0x80 { if cont & 0xc0 != 0x80 {
return None; return None;
} }
out = out << 6 | (cont & 0x3f); out = (out << 6) | (cont & 0x3f);
} }
Some(char::from_u32(out).ok_or(BadUnicode(out))) Some(char::from_u32(out).ok_or(BadUnicode(out)))
} }