From 9b68795d63567155aaf00d1cb62dfc9ea4ac98d6 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Tue, 27 Jul 2021 18:07:57 +0300 Subject: [PATCH] Borrow instead of clone --- src/stremio_app/ipc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stremio_app/ipc.rs b/src/stremio_app/ipc.rs index e491e57..a02191f 100644 --- a/src/stremio_app/ipc.rs +++ b/src/stremio_app/ipc.rs @@ -22,10 +22,10 @@ impl RPCRequest { .and_then(|args| args.first()) .and_then(|arg| arg.as_str()) } - pub fn get_params(&self) -> Option { + pub fn get_params(&self) -> Option<&serde_json::Value> { self.args.as_ref().and_then(|args| { if args.len() > 1 { - Some(args[1].clone()) + Some(&args[1]) } else { None }