From 9c075a825f255c9b2c559876b1a6a742c99dfe1a Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 20 Mar 2025 18:56:56 +0800 Subject: [PATCH] .. --- yazi-plugin/src/pubsub/pubsub.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yazi-plugin/src/pubsub/pubsub.rs b/yazi-plugin/src/pubsub/pubsub.rs index 213f1d3e..319528bd 100644 --- a/yazi-plugin/src/pubsub/pubsub.rs +++ b/yazi-plugin/src/pubsub/pubsub.rs @@ -1,8 +1,7 @@ use mlua::{ExternalResult, Function, Lua, Value}; use yazi_dds::body::Body; -use yazi_shared::Id; -use crate::runtime::RtRef; +use crate::{Id, runtime::RtRef}; pub struct Pubsub; @@ -15,8 +14,8 @@ impl Pubsub { } pub(super) fn pub_to(lua: &Lua) -> mlua::Result { - lua.create_function(|_, (receiver, kind, value): (u64, mlua::String, Value)| { - yazi_dds::Pubsub::pub_to(Id(receiver), Body::from_lua(&kind.to_str()?, value)?); + lua.create_function(|_, (receiver, kind, value): (Id, mlua::String, Value)| { + yazi_dds::Pubsub::pub_to(*receiver, Body::from_lua(&kind.to_str()?, value)?); Ok(()) }) }