Move Alice and Bob db states in separate modules

This commit is contained in:
Franck Royer 2020-12-23 15:26:08 +11:00
parent b410de01df
commit 59708c57e6
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
6 changed files with 273 additions and 262 deletions

View file

@ -4,8 +4,13 @@ use state::Swap;
use std::path::Path;
use uuid::Uuid;
mod alice;
mod bob;
pub mod state;
pub use alice::*;
pub use bob::*;
#[derive(Debug)]
pub struct Database(sled::Db);
@ -84,9 +89,8 @@ where
#[cfg(test)]
mod tests {
use crate::database::state::{Alice, AliceEndState, Bob, BobEndState};
use super::*;
use crate::database::{Alice, AliceEndState, Bob, BobEndState};
#[tokio::test]
async fn can_write_and_read_to_multiple_keys() {