mastodon.zunda.ninja is one of the many independent Mastodon servers you can use to participate in the fediverse.
Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.

Administered by:

Server stats:

1
active users

zunda

リスト13-21: Counter構造体にIteratorトレイトを実装するのやつ、nextを呼び続けるとself.countがオーバーフローするよぬ…
https://doc.rust-jp.rs/book-ja/ch13-02-iterators.html

doc.rust-jp.rs一連の要素をイテレータで処理する - The Rust Programming Language 日本語版

@zundan たしかに無条件で+=1するの、あんまよくないですね。
しかし新しいオリジナルを見に行くと(案の定?)当該コードが削除されていました。 doc.rust-lang.org/book/ch13-02
経緯のPRとかは追ってなくてごめんなさい🥺

doc.rust-lang.orgProcessing a Series of Items with Iterators - The Rust Programming Language

@tadd イテレータを自作する部分がざっくり無くなってる感じかな?該当のコードをなおすのは簡単だった(ifの中でインクリメントするようにする)ので、全体として不要ということになったのかもしれないですねー

@zundan なるほど、意味が薄いなら消えたのもわりと納得です