Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustOption and ? on OptionSingle-choice MCQ

What is the return type required for `first_char` so that the `?` operator on an Option compiles here?

fn first_char(s: &str) -> ??? { let c = s.chars().next()?; Some(c.to_ascii_uppercase()) }