We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
KVStore::read
Vec<u8>
1 parent 42ab1f2 commit 1798097Copy full SHA for 1798097
lightning/src/util/test_utils.rs
@@ -341,14 +341,12 @@ impl TestStore {
341
}
342
343
impl KVStore for TestStore {
344
- type Reader = io::Cursor<Vec<u8>>;
345
-
346
- fn read(&self, namespace: &str, key: &str) -> io::Result<Self::Reader> {
+ fn read(&self, namespace: &str, key: &str) -> io::Result<Vec<u8>> {
347
let persisted_lock = self.persisted_bytes.lock().unwrap();
348
if let Some(outer_ref) = persisted_lock.get(namespace) {
349
if let Some(inner_ref) = outer_ref.get(key) {
350
let bytes = inner_ref.clone();
351
- Ok(io::Cursor::new(bytes))
+ Ok(bytes)
352
} else {
353
Err(io::Error::new(io::ErrorKind::NotFound, "Key not found"))
354
0 commit comments