mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
9 lines
203 B
Rust
9 lines
203 B
Rust
use mlua::{Error::UserDataDestructed, Value};
|
|
|
|
pub(super) fn is_alive(v: &Value) -> bool {
|
|
if let Value::UserData(ud) = v {
|
|
!matches!(ud.borrow::<()>(), Err(UserDataDestructed))
|
|
} else {
|
|
true
|
|
}
|
|
}
|