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

Function calling_next_directly

0b_traits/rust/iterators/src/lib.rs:35–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34 #[test]
35 fn calling_next_directly() {
36 let mut counter = Counter::new();
37
38 assert_eq!(counter.next(), Some(1));
39 assert_eq!(counter.next(), Some(2));
40 assert_eq!(counter.next(), Some(3));
41 assert_eq!(counter.next(), Some(4));
42 assert_eq!(counter.next(), Some(5));
43 assert_eq!(counter.next(), None);
44 }
45
46 #[test]
47 fn using_other_iterator_trait_methods() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected