feat(tests): day4 tests

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2022-12-24 18:12:57 -05:00
parent 51e075c1ed
commit 7a571a7c7d
7 changed files with 19 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ pub struct LsmStorage {
}
impl LsmStorage {
pub fn open(_path: &Path) -> Result<Self> {
pub fn open(path: impl AsRef<Path>) -> Result<Self> {
Ok(Self {
inner: ArcSwap::from_pointee(LsmStorageInner::create()),
})
@@ -49,17 +49,17 @@ impl LsmStorage {
unimplemented!()
}
pub fn put(&mut self, key: &[u8], value: &[u8]) -> Result<()> {
pub fn put(&self, key: &[u8], value: &[u8]) -> Result<()> {
assert!(!value.is_empty(), "value cannot be empty");
assert!(!key.is_empty(), "key cannot be empty");
unimplemented!()
}
pub fn delete(&mut self, _key: &[u8]) -> Result<()> {
pub fn delete(&self, _key: &[u8]) -> Result<()> {
unimplemented!()
}
pub fn sync(&mut self) -> Result<()> {
pub fn sync(&self) -> Result<()> {
unimplemented!()
}