Re-format let-else per rustfmt update

This commit is contained in:
Mark Rousskov 2023-07-12 21:49:27 -04:00
parent 67b0cfc761
commit cc907f80b9
162 changed files with 1404 additions and 947 deletions

View file

@ -272,7 +272,7 @@ fn parse_ordered_li(buf: &[u8]) -> Parsed<'_> {
fn get_indented_section(buf: &[u8]) -> (&[u8], &[u8]) {
let mut end = buf.len();
for (idx, window) in buf.windows(2).enumerate() {
let &[ch, next_ch] = window else {unreachable!("always 2 elements")};
let &[ch, next_ch] = window else { unreachable!("always 2 elements") };
if idx >= buf.len().saturating_sub(2) && next_ch == b'\n' {
// End of stream
end = buf.len().saturating_sub(1);

View file

@ -149,7 +149,7 @@ fn write_wrapping<B: io::Write>(
let Some((end_idx, _ch)) = iter.nth(ch_count) else {
// Write entire line
buf.write_all(to_write.as_bytes())?;
cur.set(cur.get()+to_write.chars().count());
cur.set(cur.get() + to_write.chars().count());
break;
};