Skip to content

Commit

Permalink
Merge branch 'dev-database' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierrog committed Apr 11, 2024
2 parents d64aba6 + 3e11788 commit 287fc01
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ pub enum Datatype {

/// Represents the behavior of a Key-Value Store. No assumptions are made about
/// the size of the records being used, but keys are taken to be fixed-length.
pub trait KVStore<R: Record> {
fn put(&mut self, key: State, record: &R);
pub trait KVStore {
fn put<R: Record>(&mut self, key: State, record: &R);
fn get(&self, key: State) -> Option<&BitSlice<u8, Msb0>>;
fn del(&mut self, key: State);
}
Expand Down
4 changes: 2 additions & 2 deletions src/database/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ impl Database<'_> {
}
}

impl<R: Record> KVStore<R> for Database<'_> {
fn put(&mut self, key: State, value: &R) {
impl KVStore for Database<'_> {
fn put<R: Record>(&mut self, key: State, value: &R) {
todo!()
}

Expand Down
4 changes: 2 additions & 2 deletions src/database/volatile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ impl Database<'_> {
}
}

impl<R: Record> KVStore<R> for Database<'_> {
fn put(&mut self, key: State, value: &R) {
impl KVStore for Database<'_> {
fn put<R: Record>(&mut self, key: State, value: &R) {
todo!()
}

Expand Down
4 changes: 2 additions & 2 deletions src/solver/algorithm/strong/acyclic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn dynamic_backward_induction<const N: PlayerCount, D, G>(
game: &G,
) -> Result<()>
where
D: KVStore<RecordBuffer>,
D: KVStore,
G: DTransition<State> + Bounded<State> + Solvable<N>,
{
let mut stack = Vec::new();
Expand Down Expand Up @@ -140,7 +140,7 @@ fn static_backward_induction<const N: PlayerCount, D, G>(
game: &G,
) -> Result<()>
where
D: KVStore<RecordBuffer>,
D: KVStore,
G: STransition<State, MAX_TRANSITIONS> + Bounded<State> + Solvable<N>,
{
let mut stack = Vec::new();
Expand Down

0 comments on commit 287fc01

Please sign in to comment.