[I haven’t found the corresponding thread in users forum, so I’m posting here]
Oh, the dreadful:
error: cannot move out of borrowed content
fn f(tmp: &mut Option<Vec<u8>>) {
let tmpfoo = &mut tmp.unwrap();
}
fn main() {
f(&mut Some(Vec::new()));
}
Is unwrap really taking ownership!? I’m trying to unwrap to a borrowed reference, so it seems like something that should work.