1
0
Fork 0
mirror of https://github.com/rust-unofficial/awesome-rust.git synced 2024-11-20 11:36:11 -05:00

Nicer "failure only occured X ago" message

This commit is contained in:
Tom Parker-Shemilt 2020-03-26 23:29:34 +00:00
parent d4b44fd6d5
commit 60e614f51e
2 changed files with 3 additions and 2 deletions

View file

@ -22,3 +22,4 @@ log = "0.4"
regex = "1" regex = "1"
scraper = "0.11" scraper = "0.11"
chrono = { version = "0.4", features = ["serde"] } chrono = { version = "0.4", features = ["serde"] }
chrono-humanize = "0.0.11"

View file

@ -352,7 +352,7 @@ async fn main() -> Result<(), Error> {
println!("{:?}", link); println!("{:?}", link);
failed +=1; failed +=1;
} else { } else {
println!("Failure occurred but only {} ago, so we're not worrying yet: {}", since, msg); println!("Failure occurred but only {}, so we're not worrying yet: {}", chrono_humanize::HumanTime::from(-since), msg);
} }
} }
} }