fix: remove unnecessary print in cargo time (#66)

This commit is contained in:
Felix Spöttel 2024-12-01 07:24:16 +01:00 committed by GitHub
parent a49a1d3c4a
commit 10f8c0e1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,17 +31,10 @@ impl Timings {
/// Rehydrate timings from a JSON file. If not present, returns empty timings.
pub fn read_from_file() -> Self {
let s = fs::read_to_string(TIMINGS_FILE_PATH)
fs::read_to_string(TIMINGS_FILE_PATH)
.map_err(|x| x.to_string())
.and_then(Timings::try_from);
match s {
Ok(timings) => timings,
Err(e) => {
eprintln!("{e}");
Timings::default()
}
}
.and_then(Timings::try_from)
.unwrap_or_default()
}
/// Merge two sets of timings, overwriting `self` with `other` if present.