From eb3368971482dcfaaf7c266ee6bc7c2558045053 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 23 Aug 2023 11:58:27 +0200 Subject: [PATCH] f Have `KVStore::read` return `Vec` --- lightning/src/util/persist.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lightning/src/util/persist.rs b/lightning/src/util/persist.rs index ef4f84cb5..61c20b189 100644 --- a/lightning/src/util/persist.rs +++ b/lightning/src/util/persist.rs @@ -54,16 +54,12 @@ pub const SCORER_PERSISTENCE_KEY: &str = "scorer"; /// Keys and namespaces are required to be valid ASCII strings that do not contain control /// characters, and the empty namespace (`""`) is assumed to be a valid namespace. pub trait KVStore { - /// A reader as returned by [`Self::read`]. - type Reader: io::Read; - /// Returns an [`io::Read`] for the given `namespace` and `key` from which [`Readable`]s may be - /// read. + /// Returns the data stored for the given `namespace` and `key`. /// /// Returns an [`ErrorKind::NotFound`] if the given `key` could not be found in the given `namespace`. /// - /// [`Readable`]: crate::util::ser::Readable /// [`ErrorKind::NotFound`]: io::ErrorKind::NotFound - fn read(&self, namespace: &str, key: &str) -> io::Result; + fn read(&self, namespace: &str, key: &str) -> io::Result>; /// Persists the given data under the given `key`. /// /// Will create the given `namespace` if not already present in the store. -- 2.39.5