Use #[expect(lint)] over #[allow(lint)] where possible (#17822)

This commit is contained in:
Micha Reiser 2025-05-03 21:20:31 +02:00 committed by GitHub
parent 8535af8516
commit fa628018b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
148 changed files with 221 additions and 268 deletions

View file

@ -127,7 +127,7 @@ impl<T> PySlice for [T] {
if len == 0 {
// The iterator needs to have the same type as the step>0 case below,
// so we need to use `.skip(0)`.
#[allow(clippy::iter_skip_zero)]
#[expect(clippy::iter_skip_zero)]
return Ok(Either::Left(self.iter().skip(0).take(0).step_by(1)));
}
@ -192,7 +192,7 @@ impl<T> PySlice for [T] {
}
#[cfg(test)]
#[allow(clippy::redundant_clone)]
#[expect(clippy::redundant_clone)]
mod tests {
use crate::util::subscript::{OutOfBoundsError, StepSizeZeroError};