Skip to content

Commit

Permalink
lint: fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fosskers committed Aug 19, 2024
1 parent a9913de commit 6b18015
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@ mod tests {
#[test]
fn test_iter_syntax() {
let slice = [0, 1, 2, 3];
let nonempty = NESlice::from_slice(&slice);
for n in &nonempty {
assert_eq!(*n, *n); // Prove that we're dealing with references.
if let Some(nonempty) = NESlice::from_slice(&slice) {
for n in nonempty.iter() {
assert_eq!(*n, *n); // Prove that we're dealing with references.
}
}
}

Expand Down

0 comments on commit 6b18015

Please sign in to comment.