mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Merge pull request #5625 from youknowone/clippy
Apply nightly clippy suggestions
This commit is contained in:
16 files changed
+27
-37
No files matched your search
@@ -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
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user