From a127ba42a6cad7c4bf2624c96f00172c1cc0cd7a Mon Sep 17 00:00:00 2001 From: "Ryan.K" Date: Sat, 9 Dec 2023 01:13:31 +0800 Subject: [PATCH] rm unnecessary clone --- node/src/backend/native/extension.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/backend/native/extension.rs b/node/src/backend/native/extension.rs index 19b865a84..a95633d01 100644 --- a/node/src/backend/native/extension.rs +++ b/node/src/backend/native/extension.rs @@ -104,7 +104,7 @@ impl WasmABIContainer { pub fn new(msg: Option, provider: Arc) -> Self { Self { msg: Arc::new(RwLock::new(msg.map(Box::new))), - provider: Arc::new(RwLock::new(Some(provider.clone()))), + provider: Arc::new(RwLock::new(Some(provider))), } } } @@ -328,7 +328,7 @@ pub mod loader { impl super::ExtensionHandlerCaller for Handler { fn call(&self, msg: bytes::Bytes, provider: Arc) -> Result<()> { self.container.set_message(msg)?; - self.container.set_provider(provider.clone())?; + self.container.set_provider(provider)?; let native_container = self.container.clone().to_native(); { let mut mem = WASM_MEM