Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustResult and ? operatorSingle-choice MCQ

You have `let v: Vec<i32> = vec![];` and want the first element or `-1` if empty. Which expression does that without panicking?

let v: Vec<i32> = vec![]; let x = /* ? */;