Rust 1.95 promoted collapsible_match and map_unwrap_or; CI runs -D warnings so they break the build. Collapse nested `if`s into match guards across codegen/optimizer/export, and swap map().unwrap_or(..) for map_or / is_ok_and.
This commit is contained in:
@@ -397,8 +397,7 @@ impl<R: Runtime> ForthVM<R> {
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
let seed = SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.map(|d| d.as_nanos() as u64)
|
||||
.unwrap_or(0xDEAD_BEEF_CAFE_BABE);
|
||||
.map_or(0xDEAD_BEEF_CAFE_BABE, |d| d.as_nanos() as u64);
|
||||
Arc::new(Mutex::new(if seed == 0 {
|
||||
0xDEAD_BEEF_CAFE_BABE
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user