Get Option from Vec by index without moving
⚓ Rust 📅 2025-04-24 👤 surdeus 👁️ 13Hello! I've created a play for my program
Briefly: I have a Vec<Option<Box<dyn SomeTrait>>> and want to get an element by index to send it to a function. And I don't wanna to take this element - the source Vec should be untouched. How can I do this?
6 posts - 4 participants
🏷️ rust_feed