diff --git a/src/main.rs b/src/main.rs index f508164..37fe027 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,10 @@ struct Cli { #[arg(short = 'M', long)] mute: Vec, + /// Specifies a source (*.block.txt, *.mute.txt) + #[arg(short = 'S', long)] + src: Vec, + /// Specifies confidence in a source. Default = 100 #[arg(short, long)] trust: Vec, @@ -41,7 +45,7 @@ fn main() { if cli.block.is_empty() && cli.mute.is_empty() && cli.config.is_none() { error!("No lists or configuration provided."); } - + // TODO parse config file if one is provided // TODO read modsources from files diff --git a/src/tests/manip.rs b/src/tests/manip.rs index a405693..9a9597c 100644 --- a/src/tests/manip.rs +++ b/src/tests/manip.rs @@ -111,14 +111,8 @@ fn mergedlist_from_limitlist() { let test_ml = MergedLimitList { map: HashMap::from([ (String::from("example.com"), LimitIndices::from((200, 0))), - ( - String::from("example.org"), - LimitIndices::from((100, 100)), - ), - ( - String::from("example.net"), - LimitIndices::from((100, 100)), - ), + (String::from("example.org"), LimitIndices::from((100, 100))), + (String::from("example.net"), LimitIndices::from((100, 100))), ]), max: 200, }; @@ -146,14 +140,8 @@ fn mergedlist_from_limitlist() { let test_ml = MergedLimitList { map: HashMap::from([ (String::from("example.com"), LimitIndices::from((450, 0))), - ( - String::from("example.org"), - LimitIndices::from((100, 300)), - ), - ( - String::from("example.net"), - LimitIndices::from((100, 150)), - ), + (String::from("example.org"), LimitIndices::from((100, 300))), + (String::from("example.net"), LimitIndices::from((100, 150))), ]), max: 450, };