Skip to content
Quiz · Errors · lesson 3 of 8

Quiz — parse returns Result

What does the program print?

Rust
fn main() {
    match "42a".parse::<i32>() {
        Ok(n) => println!("{n}"),
        Err(_) => println!("bad"),
    }
}