Skip to content

Commit

Permalink
structure for this
Browse files Browse the repository at this point in the history
  • Loading branch information
InvalidJoker committed Aug 2, 2023
1 parent 9e9764d commit af5a231
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
13 changes: 8 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
mod container;
mod db;
mod key;

fn main() {
mod stores {
pub mod container;
pub mod db;
}

pub mod values {
pub mod key;
}

fn main() {}
2 changes: 1 addition & 1 deletion src/container.rs → src/stores/container.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use hashbrown::HashMap;

use crate::key::Key;
use crate::values::key::Key;

pub struct Container {
name: String,
Expand Down
2 changes: 1 addition & 1 deletion src/db.rs → src/stores/db.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{fs::File, path::Path};

use crate::container;
use crate::stores::container;

pub struct Database {
filename: String,
Expand Down
4 changes: 2 additions & 2 deletions src/key.rs → src/values/key.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::collections::HashMap;
use std::any::Any;
use std::collections::HashMap;

pub struct Key {
data: HashMap<String, Box<dyn Any>>,
Expand All @@ -23,4 +23,4 @@ impl Key {
None
}
}
}
}

0 comments on commit af5a231

Please sign in to comment.