mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-23 15:51:03 +00:00
11 lines
348 B
Rust
11 lines
348 B
Rust
#[macro_export]
|
|
macro_rules! deprecate {
|
|
($content:expr) => {{
|
|
static WARNED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
|
|
if !WARNED.swap(true, std::sync::atomic::Ordering::Relaxed) {
|
|
$crate::emit!(Call(
|
|
yazi_shared::event::Action::new("app:deprecate").with("content", format!($tt, id))
|
|
));
|
|
}
|
|
}};
|
|
}
|