summaryrefslogtreecommitdiffstats
path: root/src/force.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 05:24:32 +0100
committertv <tv@krebsco.de>2026-10-26 05:24:32 +0100
commit223834c9dabdab00fceda69b9ce989995de47efa (patch)
treecdc8bc55750436bc81fec6c6b67b036504f313c8 /src/force.rs
parentc0ab6dbd13f26c7307b57a032da961bd6c49461c (diff)
remove unit suffixes from fields
Diffstat (limited to 'src/force.rs')
-rw-r--r--src/force.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/force.rs b/src/force.rs
index 40f0ffc..ef1ca73 100644
--- a/src/force.rs
+++ b/src/force.rs
@@ -3,7 +3,7 @@
//! override, or is `true` for all of them (`false`, or nothing, for none).
//!
//! The same format everywhere: the `?force=` query parameter of the API and the
-//! `--force` option. Names are camelCase, like the API's fields (`switchDelaySecs`),
+//! `--force` option. Names are camelCase, like the API's fields (`switchDelay`),
//! on the command line too. An unknown name is an error, so a typo can't silently
//! override nothing.
@@ -52,17 +52,17 @@ impl Force {
mod tests {
use super::*;
- const KNOWN: &[&str] = &["switchDelaySecs", "supersede"];
+ const KNOWN: &[&str] = &["switchDelay", "supersede"];
#[test]
fn all_some_or_none() {
let all = Force::parse(["true"], KNOWN).unwrap();
- assert!(all.allows("supersede") && all.allows("switchDelaySecs"));
+ assert!(all.allows("supersede") && all.allows("switchDelay"));
let some = Force::parse(["supersede"], KNOWN).unwrap();
- assert!(some.allows("supersede") && !some.allows("switchDelaySecs"));
- let list = Force::parse(["switchDelaySecs, supersede"], KNOWN).unwrap();
- assert!(list.allows("supersede") && list.allows("switchDelaySecs"));
+ assert!(some.allows("supersede") && !some.allows("switchDelay"));
+ let list = Force::parse(["switchDelay, supersede"], KNOWN).unwrap();
+ assert!(list.allows("supersede") && list.allows("switchDelay"));
for none in [vec![], vec!["false"], vec![""]] {
assert!(!Force::parse(none, KNOWN).unwrap().allows("supersede"));