Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 20
Associated type vs generic parameter: why is Iterator::Item an associated type?
A
It allows multiple Item types per iterator
B
Generic parameters can't be used in traits
C
Associated types are faster
D
A type has one natural item type for its iterator; associated types avoid ambiguous multiple impls and simplify signatures