Merge pull request #5625 from youknowone/clippy

Apply nightly clippy suggestions
This commit is contained in:
Noa authored and GitHub committed 2025-03-26 23:40:42 -05:00
commit c9161c02b6
16 files changed
+27 -37

No files matched your search

+1 -1
View File
@@ -716,7 +716,7 @@ mod decl {
vm,
));
}
let mut res = Vec::<u8>::with_capacity(2 + ((length + 2) / 3) * 4);
let mut res = Vec::<u8>::with_capacity(2 + length.div_ceil(3) * 4);
res.push(uu_b2a(length as u8, backtick));
for chunk in b.chunks(3) {
+2 -2
View File
@@ -982,7 +982,7 @@ mod _csv {
};
loop {
let (res, nread, nwritten, nends) = reader.read_record(
input[input_offset..].as_bytes(),
&input.as_bytes()[input_offset..],
&mut buffer[output_offset..],
&mut output_ends[output_ends_offset..],
);
@@ -999,7 +999,7 @@ mod _csv {
}
}
}
let rest = input[input_offset..].as_bytes();
let rest = &input.as_bytes()[input_offset..];
if !rest.iter().all(|&c| matches!(c, b'\r' | b'\n')) {
return Err(new_csv_error(
vm,