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