Skip to content

Commit

Permalink
Fix vec iterator example
Browse files Browse the repository at this point in the history
Signed-off-by: Filippo Costa <filippo@neysofu.me>
  • Loading branch information
neysofu committed Aug 27, 2023
1 parent 03750de commit 218b986
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ use quickcheck_macros::quickcheck;

#[quickcheck]
fn test_vec_u32(nums: Vec<u32>) -> bool {
reltester::eq(nums.clone()).is_ok()
// `Iterator` is implied and checked by both `DoubleEndedIterator` and
// `FusedIterator`.
&& reltester::double_ended_iterator(nums.iter()).is_ok()
// `Iterator` is implied and checked by both `DoubleEndedIterator` and
// `FusedIterator`.
reltester::double_ended_iterator(nums.iter()).is_ok()
&& reltester::fused_iterator(nums.iter()).is_ok()
}
```
Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@
//!
//! #[quickcheck]
//! fn test_vec_u32(nums: Vec<u32>) -> bool {
//! reltester::eq(nums.clone()).is_ok()
//! // `Iterator` is implied and checked by both `DoubleEndedIterator` and
//! // `FusedIterator`.
//! && reltester::double_ended_iterator(nums.iter()).is_ok()
//! // `Iterator` is implied and checked by both `DoubleEndedIterator` and
//! // `FusedIterator`.
//! reltester::double_ended_iterator(nums.iter()).is_ok()
//! && reltester::fused_iterator(nums.iter()).is_ok()
//! }
//! ```
Expand Down

0 comments on commit 218b986

Please sign in to comment.