Hi all,
Just to let you know I wrote a Rust iterators tutorial in dev.to: YARIT: Yet Another Rust Iterators Tutorial - DEV Community 👩💻👨💻
Hope it'll help newcomers.
Comments welcome !
Hi all,
Just to let you know I wrote a Rust iterators tutorial in dev.to: YARIT: Yet Another Rust Iterators Tutorial - DEV Community 👩💻👨💻
Hope it'll help newcomers.
Comments welcome !
I like it!
Consider, in the implementation section, mentioning a few of the optional methods that may also be useful to override, like nth
and fold
(see https://github.com/rust-lang/rust/issues/60223).
A few code review nitpicks:
Debug
on the iterator structFibonacci
should do on overflow, perhaps let next_fib = self.fib_n.checked_add(self.fib_n_1)?;
Thanks for taking time of reading !
I was focusing on giving examples of iterators and for sure, code could be more comprehensive
Thanks for making this! I will add it to my to-do list for learning Rust.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.