Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 10
Heterogeneous collection: Vec<Box<dyn Shape>> vs Vec<ShapeEnum>. Which is accurate?
A
Enums can't hold data
B
The enum avoids heap allocations and dynamic dispatch, but is closed to new variants; trait objects are open but slower
C
Trait objects are always faster
D
They have identical performance