Skip to content

Commit 8263e7f

Browse files
authored
fix: remove unnecessary println
1 parent a49a1d3 commit 8263e7f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Diff for: src/template/timings.rs

+3-10
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,10 @@ impl Timings {
3131

3232
/// Rehydrate timings from a JSON file. If not present, returns empty timings.
3333
pub fn read_from_file() -> Self {
34-
let s = fs::read_to_string(TIMINGS_FILE_PATH)
34+
fs::read_to_string(TIMINGS_FILE_PATH)
3535
.map_err(|x| x.to_string())
36-
.and_then(Timings::try_from);
37-
38-
match s {
39-
Ok(timings) => timings,
40-
Err(e) => {
41-
eprintln!("{e}");
42-
Timings::default()
43-
}
44-
}
36+
.and_then(Timings::try_from)
37+
.unwrap_or_default()
4538
}
4639

4740
/// Merge two sets of timings, overwriting `self` with `other` if present.

0 commit comments

Comments
 (0)