fn main() { let num_str = "123"; match num_str.parse::<i32>() { Ok(num) => println!("Number: {}", num), Err(_) => println!("Failed to parse the string."), } }