update the return type

This commit is contained in:
Hariettemaina 2023-05-25 11:01:55 +03:00
parent 2e55059a99
commit 8ef0d03cf1

View File

@ -16,14 +16,14 @@
// Execute `rustlings hint errors5` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
use std::error;
use std::fmt;
use std::num::ParseIntError;
// TODO: update the return type of `main()` to make this compile.
fn main() -> Result<(), Box<dyn ???>> {
fn main() -> Result<(), Box<dyn error::Error>> {
let pretend_user_input = "42";
let x: i64 = pretend_user_input.parse()?;
println!("output={:?}", PositiveNonzeroInteger::new(x)?);