refactor sync-server into a lib crate with a binary

This commit is contained in:
Dustin J. Mitchell
2021-09-07 02:44:38 +00:00
parent 4690cf7fc8
commit ebcf9527dc
8 changed files with 93 additions and 82 deletions

View File

@@ -10,10 +10,11 @@ struct Inner {
versions: HashMap<(Uuid, Uuid), Version>,
}
pub(crate) struct InMemoryStorage(Mutex<Inner>);
pub struct InMemoryStorage(Mutex<Inner>);
impl InMemoryStorage {
pub(crate) fn new() -> Self {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
Self(Mutex::new(Inner {
clients: HashMap::new(),
versions: HashMap::new(),