5 ms·
Does that mean you can assign the result of the function without explicitly unwrapping? Or that the compiler removes the call to unwrap? Or neither?
by tyre 4d ago
Does that mean you can assign the result of the function without explicitly unwrapping? Or that the compiler removes the call to unwrap? Or neither?
- bonzini 4d agoYou need to unwrap but the compiler removes the call. If instead you know that the callee is infallible you can also do let Ok(x) = call_that_cant_fail();