mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-03-11 21:27:06 +00:00
Borrow instead of clone
This commit is contained in:
parent
7a4bece1b9
commit
9b68795d63
1 changed files with 2 additions and 2 deletions
|
|
@ -22,10 +22,10 @@ impl RPCRequest {
|
|||
.and_then(|args| args.first())
|
||||
.and_then(|arg| arg.as_str())
|
||||
}
|
||||
pub fn get_params(&self) -> Option<serde_json::Value> {
|
||||
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue