From a784e1136a6fcdfb2664eb17a00d635154f8a7c6 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 23 Aug 2023 12:36:16 +0200 Subject: [PATCH] f Account for `KVStore::read` returning a `Vec` --- lightning/src/util/test_utils.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs index c692f2d03..40096ac7b 100644 --- a/lightning/src/util/test_utils.rs +++ b/lightning/src/util/test_utils.rs @@ -341,14 +341,12 @@ impl TestStore { } impl KVStore for TestStore { - type Reader = io::Cursor>; - - fn read(&self, namespace: &str, key: &str) -> io::Result { + fn read(&self, namespace: &str, key: &str) -> io::Result> { let persisted_lock = self.persisted_bytes.lock().unwrap(); if let Some(outer_ref) = persisted_lock.get(namespace) { if let Some(inner_ref) = outer_ref.get(key) { let bytes = inner_ref.clone(); - Ok(io::Cursor::new(bytes)) + Ok(bytes) } else { Err(io::Error::new(io::ErrorKind::NotFound, "Key not found")) } -- 2.39.5