Borderou de evaluare (job #2447356)

Utilizator retrogradLucian Bicsi retrograd Data 13 august 2019 00:08:02
Problema BFS - Parcurgere in latime Status done
Runda Arhiva educationala Compilator rs | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: error[E0502]: cannot borrow `buf` as mutable because it is also borrowed as immutable --> main.rs:16:11 | 9 | let mut iter = buf.split_whitespace().map(|x| x.parse::<usize>().unwrap()); | --- immutable borrow occurs here ... 16 | { buf.clear(); } | ^^^ mutable borrow occurs here ... 50 | } | - immutable borrow ends here error[E0502]: cannot borrow `buf` as mutable because it is also borrowed as immutable --> main.rs:17:30 | 9 | let mut iter = buf.split_whitespace().map(|x| x.parse::<usize>().unwrap()); | --- immutable borrow occurs here ... 17 | input.read_line(&mut buf).unwrap(); | ^^^ mutable borrow occurs here ... 50 | } | - immutable borrow ends here error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0502`. Non zero exit status: 1

Ceva nu functioneaza?