yazi/yazi-config/src/platform.rs
2025-05-21 17:32:41 +08:00

9 lines
238 B
Rust

#[inline]
pub(crate) fn check_for(r#for: Option<&str>) -> bool {
match r#for.as_ref().map(|s| s.as_ref()) {
Some("unix") if cfg!(unix) => true,
Some(os) if os == std::env::consts::OS => true,
Some(_) => false,
None => true,
}
}