From: Elias Rohrer Date: Wed, 23 Aug 2023 09:58:27 +0000 (+0200) Subject: f Have `KVStore::read` return `Vec` X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=eb3368971482dcfaaf7c266ee6bc7c2558045053;p=rust-lightning f Have `KVStore::read` return `Vec` --- 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.