From c84031b4c736f1f65525f6fd57bffa85f5c58e45 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 23 Aug 2023 12:01:20 +0200 Subject: [PATCH] f Account for `KVStore::read` returning a `Vec` --- lightning-persister/src/test_utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5