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