style(natives): rustfmt cleanup after utok clippy pass

This commit is contained in:
can1357
2026-08-20 04:07:43 +02:00
parent d8d02d12c7
commit 2f3bfa4ff0
2 changed files with 12 additions and 11 deletions
+8 -8
View File
@@ -339,14 +339,14 @@ fn piece_bytes<'a, U: Unit>(piece: &'a [U], buf: &'a mut Vec<u8>) -> &'a [u8] {
// (dominant for code/English u16 input, cf. xutf's ASCII kernels;
// the trivial loop autovectorizes).
if let Some(b) = piece[i].ascii() {
buf.push(b);
i += 1;
} else {
let (c, n) = U::decode(piece, i);
i += n;
let mut tmp = [0u8; 4];
buf.extend_from_slice(c.encode_utf8(&mut tmp).as_bytes());
}
buf.push(b);
i += 1;
} else {
let (c, n) = U::decode(piece, i);
i += n;
let mut tmp = [0u8; 4];
buf.extend_from_slice(c.encode_utf8(&mut tmp).as_bytes());
}
}
buf
}
+4 -3
View File
@@ -129,9 +129,10 @@ fn main_end<U: Unit>(units: &[U], pos: usize) -> Option<usize> {
if c != '\r' && c != '\n' && !is_ps(c) {
// Not L (checked above), not P/S, not CR/LF: prefix-eligible.
if let Some((c2, n2)) = decode_at(units, pos + n)
&& is_lm(c2) {
return Some(lm_run_end(units, pos + n + n2));
}
&& is_lm(c2)
{
return Some(lm_run_end(units, pos + n + n2));
}
}
// ` ?[\p{P}\p{S}]+[\r\n]*`