Borderou de evaluare (job #2447348)
Utilizator | Data | 12 august 2019 22:55:35 | |
---|---|---|---|
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:9
|
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?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !