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;
|
// (dominant for code/English u16 input, cf. xutf's ASCII kernels;
|
||||||
// the trivial loop autovectorizes).
|
// the trivial loop autovectorizes).
|
||||||
if let Some(b) = piece[i].ascii() {
|
if let Some(b) = piece[i].ascii() {
|
||||||
buf.push(b);
|
buf.push(b);
|
||||||
i += 1;
|
i += 1;
|
||||||
} else {
|
} else {
|
||||||
let (c, n) = U::decode(piece, i);
|
let (c, n) = U::decode(piece, i);
|
||||||
i += n;
|
i += n;
|
||||||
let mut tmp = [0u8; 4];
|
let mut tmp = [0u8; 4];
|
||||||
buf.extend_from_slice(c.encode_utf8(&mut tmp).as_bytes());
|
buf.extend_from_slice(c.encode_utf8(&mut tmp).as_bytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf
|
buf
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,9 +129,10 @@ fn main_end<U: Unit>(units: &[U], pos: usize) -> Option<usize> {
|
|||||||
if c != '\r' && c != '\n' && !is_ps(c) {
|
if c != '\r' && c != '\n' && !is_ps(c) {
|
||||||
// Not L (checked above), not P/S, not CR/LF: prefix-eligible.
|
// Not L (checked above), not P/S, not CR/LF: prefix-eligible.
|
||||||
if let Some((c2, n2)) = decode_at(units, pos + n)
|
if let Some((c2, n2)) = decode_at(units, pos + n)
|
||||||
&& is_lm(c2) {
|
&& is_lm(c2)
|
||||||
return Some(lm_run_end(units, pos + n + n2));
|
{
|
||||||
}
|
return Some(lm_run_end(units, pos + n + n2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ` ?[\p{P}\p{S}]+[\r\n]*`
|
// ` ?[\p{P}\p{S}]+[\r\n]*`
|
||||||
|
|||||||
Reference in New Issue
Block a user