diff --git a/crates/radicle/src/cob/issue.rs b/crates/radicle/src/cob/issue.rs index 5237bcbb..d7214e52 100644 --- a/crates/radicle/src/cob/issue.rs +++ b/crates/radicle/src/cob/issue.rs @@ -1290,7 +1290,7 @@ mod test { let id = issue.id; let mut issue = issues.get_mut(&id).unwrap(); - let (_, reply1) = &issue.replies_to(&root).nth(0).unwrap(); + let (_, reply1) = &issue.replies_to(&root).next().unwrap(); let (_, reply2) = &issue.replies_to(&root).nth(1).unwrap(); assert_eq!(reply1.body(), "Hi hi hi."); @@ -1303,8 +1303,8 @@ mod test { let issue = issues.get(&id).unwrap().unwrap(); - assert_eq!(issue.replies_to(&c1).nth(0).unwrap().1.body(), "Re: Hi."); - assert_eq!(issue.replies_to(&c2).nth(0).unwrap().1.body(), "Re: Ha."); + assert_eq!(issue.replies_to(&c1).next().unwrap().1.body(), "Re: Hi."); + assert_eq!(issue.replies_to(&c2).next().unwrap().1.body(), "Re: Ha."); assert_eq!( issue.replies_to(&c2).nth(1).unwrap().1.body(), "Re: Ha. Ha." @@ -1370,7 +1370,7 @@ mod test { let id = issue.id; let issue = issues.get(&id).unwrap().unwrap(); - let (_, c0) = &issue.comments().nth(0).unwrap(); + let (_, c0) = &issue.comments().next().unwrap(); let (_, c1) = &issue.comments().nth(1).unwrap(); let (_, c2) = &issue.comments().nth(2).unwrap(); diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs index 21e80081..b14931dd 100644 --- a/crates/radicle/src/cob/patch.rs +++ b/crates/radicle/src/cob/patch.rs @@ -3386,7 +3386,7 @@ mod test { let review = revision.review_by(alice.signer.public_key()).unwrap(); assert_eq!(review.verdict(), Some(Verdict::Reject)); assert_eq!(review.comments().count(), 2); - assert_eq!(review.comments().nth(0).unwrap().1.body(), "First comment!"); + assert_eq!(review.comments().next().unwrap().1.body(), "First comment!"); assert_eq!( review.comments().nth(1).unwrap().1.body(), "Second comment!" @@ -3517,7 +3517,7 @@ mod test { assert_eq!(patch.revisions.len(), 2); assert_eq!(patch.revisions().count(), 2); assert_eq!( - patch.revisions().nth(0).unwrap().1.description(), + patch.revisions().next().unwrap().1.description(), "Blah blah blah." ); assert_eq!( diff --git a/crates/radicle/src/cob/thread.rs b/crates/radicle/src/cob/thread.rs index 572c4528..f665f447 100644 --- a/crates/radicle/src/cob/thread.rs +++ b/crates/radicle/src/cob/thread.rs @@ -714,7 +714,7 @@ mod tests { let a3 = alice.redact(a1.id()); thread.op(a3, [], &repo).unwrap(); - let (_, comment0) = thread.comments().nth(0).unwrap(); + let (_, comment0) = thread.comments().next().unwrap(); let (_, comment1) = thread.comments().nth(1).unwrap(); assert_eq!(thread.comments().count(), 2); diff --git a/crates/radicle/src/lib.rs b/crates/radicle/src/lib.rs index b0a3b7ac..28d78c38 100644 --- a/crates/radicle/src/lib.rs +++ b/crates/radicle/src/lib.rs @@ -1,5 +1,4 @@ #![allow(clippy::too_many_arguments)] -#![allow(clippy::iter_nth_zero)] #![warn(clippy::unwrap_used)] pub extern crate radicle_crypto as crypto;