diff --git a/hive-forge/src/verbs/subscription.rs b/hive-forge/src/verbs/subscription.rs index 13d77e10..bdf7eca2 100644 --- a/hive-forge/src/verbs/subscription.rs +++ b/hive-forge/src/verbs/subscription.rs @@ -128,19 +128,15 @@ pub fn run(client: &Client, args: Args) -> Result<()> { mod tests { use super::{Args, reject_ignore}; - fn args(watch: bool, ignore: bool, unwatch: bool, list: bool) -> Args { - Args { - watch, - ignore, - unwatch, - list, - } - } - #[test] fn ignore_is_rejected_pointing_at_unwatch() { - let err = - reject_ignore(&args(false, true, false, false)).expect_err("--ignore must be refused"); + let args = Args { + watch: false, + ignore: true, + unwatch: false, + list: false, + }; + let err = reject_ignore(&args).expect_err("--ignore must be refused"); let msg = err.to_string(); assert!(msg.contains("--unwatch")); assert!(msg.contains("--watch")); @@ -149,6 +145,12 @@ mod tests { #[test] fn watch_is_not_rejected() { - assert!(reject_ignore(&args(true, false, false, false)).is_ok()); + let args = Args { + watch: true, + ignore: false, + unwatch: false, + list: false, + }; + assert!(reject_ignore(&args).is_ok()); } }