From: Elias Rohrer Date: Wed, 23 Aug 2023 10:01:20 +0000 (+0200) Subject: f Account for `KVStore::read` returning a `Vec` X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c84031b4c736f1f65525f6fd57bffa85f5c58e45;p=rust-lightning f Account for `KVStore::read` returning a `Vec` --- diff --git a/lightning-persister/src/test_utils.rs b/lightning-persister/src/test_utils.rs index daf6f5ee6..f6cc73c81 100644 --- a/lightning-persister/src/test_utils.rs +++ b/lightning-persister/src/test_utils.rs @@ -1,5 +1,7 @@ use lightning::util::persist::KVStore; +use std::io::Cursor; + pub(crate) fn do_read_write_remove_list_persist(kv_store: &K) { use lightning::util::ser::Readable; @@ -19,7 +21,7 @@ pub(crate) fn do_read_write_remove_list_persist(kv_store: &K) { assert_eq!(listed_keys.len(), 1); assert_eq!(listed_keys[0], key); - let mut reader = kv_store.read(namespace, key).unwrap(); + let mut reader = Cursor::new(kv_store.read(namespace, key).unwrap()); let read_data: [u8; 32] = Readable::read(&mut reader).unwrap(); assert_eq!(data, read_data);