Skip to content

Commit

Permalink
appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed May 25, 2023
1 parent f910da8 commit 4767e03
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,12 +955,14 @@ mod test {
#[test]
fn config_human_times() {
let app = crate::clap::build_app();
let matches = app.get_matches_from(&["btm"]);
let matches = app.get_matches_from(["btm"]);

let mut config = Config::default();
let mut flags = ConfigFlags::default();
flags.time_delta = Some("2 min".to_string());
flags.default_time_value = Some("300s".to_string());
let flags = ConfigFlags {
time_delta: Some("2 min".to_string()),
default_time_value: Some("300s".to_string()),
..Default::default()
};

config.flags = Some(flags);

Expand All @@ -978,12 +980,14 @@ mod test {
#[test]
fn config_number_times() {
let app = crate::clap::build_app();
let matches = app.get_matches_from(&["btm"]);
let matches = app.get_matches_from(["btm"]);

let mut config = Config::default();
let mut flags = ConfigFlags::default();
flags.time_delta = Some("120000".to_string());
flags.default_time_value = Some("300000".to_string());
let flags = ConfigFlags {
time_delta: Some("120000".to_string()),
default_time_value: Some("300000".to_string()),
..Default::default()
};

config.flags = Some(flags);

Expand Down

0 comments on commit 4767e03

Please sign in to comment.