-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
For me, at least, the example using next()
and next_back()
tells the story better if it shows the output.
I'm reading about the DoubleEndedIterator
Thanks to mbrubeck on #rust-beginners for these examples:
let mut iter = vec![1,2,3,4,5].into_iter(); (iter.next(), iter.next_back())
(Some(1), Some(5))
let mut i = vec![1,2,3,4,5].into_iter(); (i.next(), i.next_back(), i.next(), i.next_back())
(Some(1), Some(5), Some(2), Some(4))
I plan to come back to this issue and submit a proper documentation patch.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.