Skip to content

Commit

Permalink
Fixed KVStore get method to take mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierrog committed Apr 11, 2024
1 parent f8382a5 commit 619b64d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub enum Datatype {
pub trait KVStore<R: Record> {
fn put(&mut self, key: State, record: &R);
fn get(&self, key: State) -> Option<&BitSlice<u8, Msb0>>;
fn del(&self, key: State);
fn del(&mut self, key: State);
}

/// Allows a database to be evicted to persistent media. Implementing this trait
Expand Down
2 changes: 1 addition & 1 deletion src/database/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<R: Record> KVStore<R> for Database<'_> {
todo!()
}

fn del(&self, key: State) {
fn del(&mut self, key: State) {
todo!()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/database/volatile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<R: Record> KVStore<R> for Database<'_> {
todo!()
}

fn del(&self, key: State) {
fn del(&mut self, key: State) {
todo!()
}
}
Expand Down

0 comments on commit 619b64d

Please sign in to comment.