From a209631d6c95def54208c03f27b54aa500ab7b3d Mon Sep 17 00:00:00 2001 From: Douglas Dwyer Date: Sun, 22 Oct 2023 21:41:57 -0400 Subject: [PATCH] Fix return type and remove unused code --- src/tree_store/page_store/file_backend/unix.rs | 2 +- src/tree_store/page_store/in_memory_backend.rs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/tree_store/page_store/file_backend/unix.rs b/src/tree_store/page_store/file_backend/unix.rs index 0d539f42..29e06e15 100644 --- a/src/tree_store/page_store/file_backend/unix.rs +++ b/src/tree_store/page_store/file_backend/unix.rs @@ -26,7 +26,7 @@ impl FileBackend { // This is a no-op until we get flock in wasi-libc. // Delete this function when we get flock. #[cfg(target_os = "wasi")] - pub fn new(file: File) -> Result { + pub fn new(file: File) -> Result { Ok(Self { file }) } diff --git a/src/tree_store/page_store/in_memory_backend.rs b/src/tree_store/page_store/in_memory_backend.rs index 916237a2..4ab0c783 100644 --- a/src/tree_store/page_store/in_memory_backend.rs +++ b/src/tree_store/page_store/in_memory_backend.rs @@ -29,12 +29,6 @@ impl InMemoryBackend { } } -impl From> for InMemoryBackend { - fn from(value: Vec) -> Self { - Self(RwLock::new(value)) - } -} - impl StorageBackend for InMemoryBackend { fn len(&self) -> Result { Ok(self.read().len() as u64)