Company: Cisco_22_jan_MCQ
Difficulty: medium
Consider the following Rust code snippet that attempts to modify the elements of a vector: let mut vec = vec![1, 2, 3, 4, 5]; for i in vec.iter_mut() { *i += 10; } Which part of the code ensures that the elements in the vector are mutable and can be modified within the loop?
An application requires concurrent processing of data from multiple sources in Rust. Which approach ensures efficient error handling and data synchronization among threads?