We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e0146a + c7305e6 commit 4dafcaeCopy full SHA for 4dafcae
src/trait/iter.md
@@ -17,7 +17,8 @@ struct Fibonacci {
17
}
18
19
// Implement `Iterator` for `Fibonacci`.
20
-// The `Iterator` trait only requires a method to be defined for the `next` element.
+// The `Iterator` trait only requires a method to be defined for the `next` element,
21
+// and an `associated type` to declare the return type of the iterator.
22
impl Iterator for Fibonacci {
23
// We can refer to this type using Self::Item
24
type Item = u32;
0 commit comments