Skip to content

Commit 4e245d1

Browse files
committed
dist: Fix clippy issue with .expect
Signed-off-by: Daniel Silverstone <[email protected]>
1 parent 1493499 commit 4e245d1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/dist/dist.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,12 @@ fn update_from_dist_<'a>(
700700
toolchain.date.as_ref().unwrap_or(&fetched),
701701
"%Y-%m-%d",
702702
)
703-
.expect(&format!(
704-
"Malformed manifest date: {:?}",
705-
toolchain.date.as_ref().unwrap_or(&fetched)
706-
)),
703+
.unwrap_or_else(|_| {
704+
panic!(
705+
"Malformed manifest date: {:?}",
706+
toolchain.date.as_ref().unwrap_or(&fetched)
707+
)
708+
}),
707709
)
708710
.pred();
709711

0 commit comments

Comments
 (0)