Skip to content

Commit

Permalink
Added cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor Kinsella authored and frankhorv committed Jul 7, 2022
1 parent 7aa9f72 commit f27af7a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
12 changes: 2 additions & 10 deletions src/cli/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ use std::io::ErrorKind;
// Ok(())
// }

fn generate_default_config(y) -> Result<(), serde::yaml::Error> {
// Overwrite variable to see if variable passed in
let overwrite: bool

if y == None{
overwrite = False;
} else{
overwrite == True;
};
fn generate_default_config(overwrite:bool) -> Result<(), serde::yaml::Error> {

// Path to file
let path = Path::new("./configuration/base.yaml");
Expand All @@ -53,7 +45,7 @@ fn generate_default_config(y) -> Result<(), serde::yaml::Error> {
let s = serde_yaml::to_string(&settings)?;

// Creates file in directory
let f = File::create("./configuration/base.yaml");
let f = File::create(&path);

// match statement, if file creates
// let f = match f {
Expand Down
6 changes: 2 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use anyhow::Context;
use clap::Parser;
use snmp_sim::app::Service;
use snmp_sim::configuration::get_configuration;
use clap::Parser;

#[derive(Parser, Debug)]
#[clap(about, version, author)]
struct Value {
/* To be filled with args/values */
}
struct Value {/* To be filled with args/values */}

#[actix_web::main]
async fn main() -> anyhow::Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/settings/app_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn default_port() -> u16 {
}

fn default_uri_prefix() -> String {
"mngmt/v1".to_string()
"".to_string()
}

fn default_verbosity_level() -> String {
Expand Down
1 change: 0 additions & 1 deletion src/settings/database_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fn default_connection_uri() -> String {
"sqlite://~/.snmp-sim/snmp-sim.db".to_string()
}


fn default_tests_skip_drop() -> bool {
false
}
Expand Down

0 comments on commit f27af7a

Please sign in to comment.