Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Get Option from Vec by index without moving
Hello! 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