MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / calling_next_directly

Function calling_next_directly

09_iterators/rust/iterators/src/lib.rs:29–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28 #[test]
29 fn calling_next_directly() {
30 let mut counter = Counter::new();
31
32 assert_eq!(counter.next(), Some(1));
33 assert_eq!(counter.next(), Some(2));
34 assert_eq!(counter.next(), Some(3));
35 assert_eq!(counter.next(), Some(4));
36 assert_eq!(counter.next(), Some(5));
37 assert_eq!(counter.next(), None);
38 }
39
40 #[test]
41 fn using_other_iterator_trait_methods() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected