mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 14:51:03 +00:00
27 lines
284 B
Rust
27 lines
284 B
Rust
#[macro_export]
|
|
macro_rules! unix_either {
|
|
($a:expr, $b:expr) => {{
|
|
#[cfg(unix)]
|
|
{
|
|
$a
|
|
}
|
|
#[cfg(not(unix))]
|
|
{
|
|
$b
|
|
}
|
|
}};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! win_either {
|
|
($a:expr, $b:expr) => {{
|
|
#[cfg(windows)]
|
|
{
|
|
$a
|
|
}
|
|
#[cfg(not(windows))]
|
|
{
|
|
$b
|
|
}
|
|
}};
|
|
}
|