From 11a3911f7097752ef39c02267f1bdc65ef9f544b Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 8 Jul 2022 21:55:44 +0100 Subject: [PATCH] =?UTF-8?q?Add=20RPC=20let=E2=80=99=20command=20as=20a=20d?= =?UTF-8?q?uplicate=20of=20=E2=80=98set=E2=80=99=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/net/rpc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net/rpc.rs b/src/net/rpc.rs index 5d8ffce3..121a5350 100644 --- a/src/net/rpc.rs +++ b/src/net/rpc.rs @@ -139,6 +139,10 @@ impl Rpc { v if v.is_strand() => rpc.read().await.live(v).await, _ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await, }, + "let" => match params.take_two() { + (Value::Strand(s), v) => rpc.write().await.set(s, v).await, + _ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await, + }, "set" => match params.take_two() { (Value::Strand(s), v) => rpc.write().await.set(s, v).await, _ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,