Beginner
Rust
Q14 / 100
What does the ? operator do in Rust?
Correct! Well done.
Incorrect.
The correct answer is B) Unwraps a Result, returning early with Err if the operation failed
B
Correct Answer
Unwraps a Result, returning early with Err if the operation failed
Explanation
let file = File::open("path")?; returns the Err to the caller if it fails, otherwise unwraps the Ok value. Replaces verbose match expressions.
Progress
14/100