diff --git a/aquatic/src/bin/aquatic.rs b/aquatic/src/bin/aquatic.rs index 7c44968..f52b5a8 100644 --- a/aquatic/src/bin/aquatic.rs +++ b/aquatic/src/bin/aquatic.rs @@ -7,7 +7,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; fn main(){ - cli_helpers::run_with_cli_and_config( + cli_helpers::run_with_cli_and_config::( "aquatic: udp bittorrent tracker", aquatic::run, ) diff --git a/cli_helpers/src/lib.rs b/cli_helpers/src/lib.rs index 8098c41..6541932 100644 --- a/cli_helpers/src/lib.rs +++ b/cli_helpers/src/lib.rs @@ -36,11 +36,11 @@ fn default_config_as_toml() -> String } -pub fn run_with_cli_and_config( +pub fn run_with_cli_and_config( title: &str, // Function that takes config file and runs application - f: F, -) where T: Default + Serialize + DeserializeOwned, F: Fn(T) { + f: fn(T), +) where T: Default + Serialize + DeserializeOwned { let args: Vec = ::std::env::args().collect(); match AppOptions::parse_args_default(&args[1..]){ @@ -77,4 +77,4 @@ fn print_help(title: &str, opt_error: Option<&str>){ } println!("\n{}", AppOptions::usage()); -} \ No newline at end of file +}