From d425f67a8ba026bd2b2fdba09271ec87fa3c0057 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 8 Jul 2022 21:56:04 +0100 Subject: [PATCH] Allow NULL and missing values in RPC query method --- src/net/rpc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/rpc.rs b/src/net/rpc.rs index 121a5350..9d0ea263 100644 --- a/src/net/rpc.rs +++ b/src/net/rpc.rs @@ -148,7 +148,7 @@ impl Rpc { _ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await, }, "query" => match params.take_two() { - (Value::Strand(s), Value::None) => rpc.read().await.query(s).await, + (Value::Strand(s), o) if o.is_none() => rpc.read().await.query(s).await, (Value::Strand(s), Value::Object(o)) => rpc.read().await.query_with(s, o).await, _ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await, },