aboutsummaryrefslogtreecommitdiffstats
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
commit8a190a4a66f02eb14c8c4987c6413c5ae826d688 (patch)
treedb17c5b6e6a153c1ca1051ee24a674fad20651dd /src/force.rs
parent6978dc3c7d106a3d8212b22f63c00ca58dfef40c (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"));