use tokio::sync::oneshot; use yazi_config::popup::SelectCfg; use yazi_shared::event::Cmd; pub struct SelectOpt { pub cfg: SelectCfg, pub tx: oneshot::Sender>, } impl TryFrom for SelectOpt { type Error = (); fn try_from(mut c: Cmd) -> Result { c.take_data().ok_or(()) } }