From: Elias Rohrer Date: Wed, 23 Aug 2023 10:36:16 +0000 (+0200) Subject: f Account for `KVStore::read` returning a `Vec` X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a784e1136a6fcdfb2664eb17a00d635154f8a7c6;p=rust-lightning f Account for `KVStore::read` returning a `Vec` --- 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")) }