Skip to content

Commit

Permalink
fix: remove unnecessary print in cargo time (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
fspoettel authored Dec 1, 2024
1 parent a49a1d3 commit 10f8c0e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/template/timings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 10f8c0e

Please sign in to comment.