Skip to content

Commit

Permalink
refactor: ♻️ cleaned up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Jul 5, 2021
1 parent 9e50958 commit 3a40616
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use lib::{get_cfg, raw_schema, BONNIE_VERSION};
use lib::{get_cfg, Config, BONNIE_VERSION};
use std::env;

// All this does is run the program and terminate with the acquired exit code
Expand Down Expand Up @@ -28,7 +28,7 @@ fn core() -> Result<i32, String> {
let cfg_str = get_cfg()?;
// Create a raw config object and parse it fully
// TODO this takes meaningful millseconds for complex configs, so we should be able to cache its results in `.bonnie.cache.json` for speed in extreme cases
let cfg = raw_schema::Config::new(&cfg_str)?.to_final(BONNIE_VERSION)?;
let cfg = Config::new(&cfg_str)?.to_final(BONNIE_VERSION)?;
// Get the arguments to this program, removing the first one (something like `bonnie`)
let mut prog_args: Vec<String> = env::args().collect();
let _executable_name = prog_args.remove(0); // This will panic if the first argument is not found (which is probably someone trying to fuzz us)
Expand Down
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
mod bones;
mod default_shells;
mod get_cfg;
pub mod raw_schema;
pub mod schema;
mod raw_schema;
mod schema;
mod version;

pub use crate::get_cfg::get_cfg;
pub use crate::raw_schema::Config;
pub use crate::version::BONNIE_VERSION;

// FIXME
pub use crate::bones::parse_directive_str;

0 comments on commit 3a40616

Please sign in to comment.