Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6d7fef0

Browse files
committed
bin: replace .unwrap_or with .map_or
Signed-off-by: Otavio Salvador <[email protected]>
1 parent 5d4ed07 commit 6d7fef0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/bin/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ fn make_opts() -> Options {
156156
}
157157

158158
fn is_nightly() -> bool {
159-
option_env!("CFG_RELEASE_CHANNEL")
160-
.map(|c| c == "nightly" || c == "dev")
161-
.unwrap_or(false)
159+
option_env!("CFG_RELEASE_CHANNEL").map_or(false, |c| c == "nightly" || c == "dev")
162160
}
163161

164162
// Returned i32 is an exit code

0 commit comments

Comments
 (0)