From 7b4ef40688678c5520c2efeebc7208a133e9dbc4 Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 9 Oct 2026 12:10:48 +0200 Subject: [PATCH] hive-forge: inline test Args literals, drop the 4-bool helper (clippy::fn_params_excessive_bools) --- hive-forge/src/verbs/subscription.rs | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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()); } }