The program below processes a shared string buffer through Mutex<Vec<String>>. You need to determine the exact stdout after running it. Pay attention to iterator laziness and to the point at which side effects inside inspect are actually executed.
preview_and_drain first collects the list of string lengths into Vec<usize>.inspect is executed only when the iterator is actually consumed.take(1) limits how many elements are consumed.src/main.rs.cargo run --quiet
preview_and_drain finishes.1.85.02021cargo run --quietClick a line and write what it prints. Explanation is optional.