Closed
Description
old:
src/sparsevec.rs:49:9: 49:15 error: cannot borrow `self.0` as mutable more than once at a time [E0499]
src/sparsevec.rs:49 self.0.extend((0..(i - len)).map(|_| None));
^~~~~~
src/sparsevec.rs:49 match self.0.get_mut(i) {
^~~~~~
src/sparsevec.rs:49 }
^
src/sparsevec.rs:49:9: 49:15 help: run `rustc --explain E0499` to see a detailed explanation
new:
error: cannot borrow `self.0` as mutable more than once at a time [--explain E0499]
--> src/sparsevec.rs:49:9
38 |> match self.0.get_mut(i) {
|> ------ first mutable borrow occurs here
...
49 |> self.0.extend((0..(i - len)).map(|_| None));
|> ^^^^^^ second mutable borrow occurs here
50 |> self.get_mut_or_put(i, f)
51 |> }
|> - first borrow ends here