MCPcopy Create free account
hub / github.com/Apress/beginning-rust-2e / get_third

Function get_third

Source Code/19-33.rs:4–11  ·  view source on GitHub ↗
(mut iterator: Iter)

Source from the content-addressed store, hash-verified

2None, Some(22), None, Some(4.3)*/
3fn main() {
4 fn get_third<Iter>(mut iterator: Iter) -> Option<Iter::Item>
5 where
6 Iter: Iterator,
7 {
8 iterator.next();
9 iterator.next();
10 iterator.next()
11 }
12 print!(
13 "{:?}, {:?}, {:?}, {:?}",
14 get_third(10..12),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected