aboutsummaryrefslogtreecommitdiff
path: root/structopt/examples/negative_flag.rs
diff options
context:
space:
mode:
Diffstat (limited to 'structopt/examples/negative_flag.rs')
-rw-r--r--structopt/examples/negative_flag.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/structopt/examples/negative_flag.rs b/structopt/examples/negative_flag.rs
deleted file mode 100644
index b178bf5..0000000
--- a/structopt/examples/negative_flag.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-//! How to add `no-thing` flag which is `true` by default and
-//! `false` if passed.
-
-use structopt::StructOpt;
-
-#[derive(Debug, StructOpt)]
-struct Opt {
- #[structopt(long = "no-verbose", parse(from_flag = std::ops::Not::not))]
- verbose: bool,
-}
-
-fn main() {
- let cmd = Opt::from_args();
- println!("{:#?}", cmd);
-}