forked from Rust-related/RustPython
Fix clippy warnings
This commit is contained in:
@@ -245,10 +245,10 @@ pub mod levenshtein {
|
||||
if a == b {
|
||||
return 0;
|
||||
}
|
||||
if (b'A'..=b'Z').contains(&a) {
|
||||
if a.is_ascii_uppercase() {
|
||||
a += b'a' - b'A';
|
||||
}
|
||||
if (b'A'..=b'Z').contains(&b) {
|
||||
if b.is_ascii_uppercase() {
|
||||
b += b'a' - b'A';
|
||||
}
|
||||
if a == b {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "1.67.1"
|
||||
channel = "stable"
|
||||
|
||||
@@ -1879,8 +1879,9 @@ mod _io {
|
||||
write_through: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[derive(Debug, Copy, Clone, Default)]
|
||||
enum Newlines {
|
||||
#[default]
|
||||
Universal,
|
||||
Passthrough,
|
||||
Lf,
|
||||
@@ -1888,13 +1889,6 @@ mod _io {
|
||||
Crlf,
|
||||
}
|
||||
|
||||
impl Default for Newlines {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
Newlines::Universal
|
||||
}
|
||||
}
|
||||
|
||||
impl Newlines {
|
||||
/// returns position where the new line starts if found, otherwise position at which to
|
||||
/// continue the search after more is read into the buffer
|
||||
@@ -2054,8 +2048,9 @@ mod _io {
|
||||
data: PendingWritesData,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
enum PendingWritesData {
|
||||
#[default]
|
||||
None,
|
||||
One(PendingWrite),
|
||||
Many(Vec<PendingWrite>),
|
||||
@@ -2076,12 +2071,6 @@ mod _io {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for PendingWritesData {
|
||||
fn default() -> Self {
|
||||
PendingWritesData::None
|
||||
}
|
||||
}
|
||||
|
||||
impl PendingWrites {
|
||||
fn push(&mut self, write: PendingWrite) {
|
||||
self.num_bytes += write.as_bytes().len();
|
||||
|
||||
Reference in New Issue
Block a user