From 714ced178e54770a88cf6fb3894cd07e257842c5 Mon Sep 17 00:00:00 2001 From: Harry Ying Date: Mon, 23 Jan 2023 14:58:43 +0000 Subject: [PATCH] fix cargo clippy --- droute/src/router/script/rune_scripting/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/droute/src/router/script/rune_scripting/mod.rs b/droute/src/router/script/rune_scripting/mod.rs index a173fb7..99ee899 100644 --- a/droute/src/router/script/rune_scripting/mod.rs +++ b/droute/src/router/script/rune_scripting/mod.rs @@ -61,7 +61,7 @@ impl ScriptBackend for RuneScript { let query: NewMessage = query.into(); vm.send_execute( - &["route"], + ["route"], (self.upstreams.clone(), self.inited.clone(), ctx, query), )? }; @@ -134,7 +134,7 @@ impl ScriptBuilder for RuneScriptBuilder { let mut vm = Vm::new(runtime.clone(), unit.clone()); // Don't error if we cannot find init function, just return an empty object - let inited = if unit.function(rune::Hash::type_hash(&["init"])).is_some() { + let inited = if unit.function(rune::Hash::type_hash(["init"])).is_some() { >>::from_value(vm.async_call(&["init"], ()).await?)?? } else { HashMap::::new()