Skip to content

Commit

Permalink
Fix MSRV build
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Oct 28, 2024
1 parent 06bf401 commit 56e8487
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/red_knot_python_semantic/src/util/subscript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ impl<T> PySlice for &[T] {

let len = self.len();
if len == 0 {
#[allow(
clippy::iter_skip_zero,
reason = "The iterator needs to have the same type as the step>0 case below."
)]
// 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)]
return Either::Left(self.iter().skip(0).take(0).step_by(1));
}

Expand Down

0 comments on commit 56e8487

Please sign in to comment.