From 5d26a655a0ebc817875f5e0f61de3c2e83eaa313 Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Wed, 18 Dec 2024 08:45:59 +0100 Subject: [PATCH] fix: optimized NEAR decode --- .../src/client/env/proxy/query/context_storage_entries.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/context/config/src/client/env/proxy/query/context_storage_entries.rs b/crates/context/config/src/client/env/proxy/query/context_storage_entries.rs index bf4251384..f2c9f4d67 100644 --- a/crates/context/config/src/client/env/proxy/query/context_storage_entries.rs +++ b/crates/context/config/src/client/env/proxy/query/context_storage_entries.rs @@ -29,15 +29,15 @@ impl Method for ContextStorageEntriesRequest { fn decode(response: Vec) -> eyre::Result { // Decode the response as Vec of tuples with boxed slices - let entries: Vec<(Box<[u8]>, Box<[u8]>)> = serde_json::from_slice(&response) + let entries: Vec<(Vec, Vec)> = serde_json::from_slice(&response) .map_err(|e| eyre::eyre!("Failed to decode response: {}", e))?; // Convert to ContextStorageEntry Ok(entries .into_iter() .map(|(key, value)| ContextStorageEntry { - key: key.to_vec(), - value: value.to_vec(), + key, + value }) .collect()) }