From 142553a9cce67d03055abac68c5b740350f43aff Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 12 Apr 2021 00:34:56 +0900 Subject: [PATCH] client: use StructOpt's conflicts_with --- client/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/main.rs b/client/src/main.rs index cc2614d..c41e00f 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -33,11 +33,11 @@ struct Opt { #[derive(Debug, StructOpt)] struct HostsOpt { /// The path to write hosts to. - #[structopt(long, default_value = "/etc/hosts")] + #[structopt(long = "hosts-path", default_value = "/etc/hosts")] hosts_path: PathBuf, - /// Don't write to any hosts files. This takes precedence over --hosts-path. - #[structopt(long)] + /// Don't write to any hosts files. + #[structopt(long = "no-write-hosts", conflicts_with = "hosts-path")] no_write_hosts: bool, }