Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10f8c0e

Browse files
authored
fix: remove unnecessary print incargo time (fspoettel#66)
1 parenta49a1d3 commit10f8c0e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

‎src/template/timings.rs‎

Lines changed: 3 additions & 10 deletions
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
pubfnread_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)

[8]ページ先頭

©2009-2025 Movatter.jp