Core Intermediate
08 Error handling
Rust models absence and failure in the type system: return an Option for a maybe-missing char, then use ? to propagate parse errors.
Return the first character, or None for "", in first_char.
Hints
s.chars().next()givesOption<char>.
Reveal solution
fn first_char(s: &str) -> Option<char> {
s.chars().next()
}