From a65686af4fd5341c7b9ac895b4ae76058db04b58 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Sun, 9 Jun 2024 19:43:40 +0200 Subject: [PATCH] from (Keyexp, Parameters) added --- .../src/replica/storage.rs | 2 +- zenoh/src/api/selector.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs b/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs index ed7f533147..1cdced1c0b 100644 --- a/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs +++ b/plugins/zenoh-plugin-storage-manager/src/replica/storage.rs @@ -647,7 +647,7 @@ impl StorageService { // with `_time=[..]` to get historical data (in case of time-series) let replies = match self .session - .get(Selector::owned(&self.key_expr, "_time=[..]")) + .get((&self.key_expr, "_time=[..]")) .target(QueryTarget::All) .consolidation(ConsolidationMode::None) .await diff --git a/zenoh/src/api/selector.rs b/zenoh/src/api/selector.rs index 6f6eeaf8ff..6e2e0e7890 100644 --- a/zenoh/src/api/selector.rs +++ b/zenoh/src/api/selector.rs @@ -93,6 +93,16 @@ impl<'a> Selector<'a> { } } +impl<'a, K, P> From<(K, P)> for Selector<'a> +where + K: Into>, + P: Into>, +{ + fn from((key_expr, parameters): (K, P)) -> Self { + Self::owned(key_expr, parameters) + } +} + impl<'a> From> for (KeyExpr<'a>, Parameters<'a>) { fn from(selector: Selector<'a>) -> Self { (