style(natives): rustfmt cleanup after utok clippy pass
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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]*`
|
||||
|
||||
Reference in New Issue
Block a user