summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-07-30 13:23:17 +0200
committerLinus Färnstrand <linus@mullvad.net>2018-07-30 13:23:17 +0200
commit6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee (patch)
treecbd0ff3968aad4d897e5daf2c10bd46c34d03d12 /mullvad-cli
parenta9270436ab85bc01eb3313d72ce231008676d7f0 (diff)
downloadmullvadvpn-6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee.tar.xz
mullvadvpn-6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee.zip
Reformat with rustfmt 0.9.0
Diffstat (limited to 'mullvad-cli')
-rw-r--r--mullvad-cli/src/cmds/account.rs6
-rw-r--r--mullvad-cli/src/cmds/auto_connect.rs3
-rw-r--r--mullvad-cli/src/cmds/lan.rs3
-rw-r--r--mullvad-cli/src/cmds/relay.rs27
-rw-r--r--mullvad-cli/src/cmds/tunnel.rs9
5 files changed, 16 insertions, 32 deletions
diff --git a/mullvad-cli/src/cmds/account.rs b/mullvad-cli/src/cmds/account.rs
index 5ad7822222..5757aac42d 100644
--- a/mullvad-cli/src/cmds/account.rs
+++ b/mullvad-cli/src/cmds/account.rs
@@ -23,12 +23,10 @@ impl Command for Account {
.help("The Mullvad account token to configure the client with")
.required(true),
),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("get")
.about("Display information about the currently configured account"),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("unset")
.about("Removes the account number from the settings"),
)
diff --git a/mullvad-cli/src/cmds/auto_connect.rs b/mullvad-cli/src/cmds/auto_connect.rs
index 57c125c4b6..f471fbde56 100644
--- a/mullvad-cli/src/cmds/auto_connect.rs
+++ b/mullvad-cli/src/cmds/auto_connect.rs
@@ -22,8 +22,7 @@ impl Command for AutoConnect {
.required(true)
.possible_values(&["on", "off"]),
),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("get")
.about("Display the current auto-connect setting"),
)
diff --git a/mullvad-cli/src/cmds/lan.rs b/mullvad-cli/src/cmds/lan.rs
index 7f6b3a0444..bd6516f6bf 100644
--- a/mullvad-cli/src/cmds/lan.rs
+++ b/mullvad-cli/src/cmds/lan.rs
@@ -22,8 +22,7 @@ impl Command for Lan {
.required(true)
.possible_values(&["allow", "block"]),
),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("get")
.about("Display the current local network sharing setting"),
)
diff --git a/mullvad-cli/src/cmds/relay.rs b/mullvad-cli/src/cmds/relay.rs
index 61f2e8d77e..2bdf84f40a 100644
--- a/mullvad-cli/src/cmds/relay.rs
+++ b/mullvad-cli/src/cmds/relay.rs
@@ -34,50 +34,42 @@ impl Command for Relay {
.required(true)
.index(1)
.possible_values(&["openvpn", "wireguard"]),
- )
- .arg(
+ ).arg(
clap::Arg::with_name("host")
.help("Hostname or IP")
.required(true)
.index(2),
- )
- .arg(
+ ).arg(
clap::Arg::with_name("port")
.help("Remote network port")
.required(true)
.index(3),
- )
- .arg(
+ ).arg(
clap::Arg::with_name("protocol")
.help("Transport protocol. For Wireguard this is ignored.")
.index(4)
.default_value("udp")
.possible_values(&["udp", "tcp"]),
),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("location")
.about(
"Set country or city to select relays from. Use the 'list' \
command to show available alternatives.",
- )
- .arg(
+ ).arg(
clap::Arg::with_name("country")
.help(
"The two letter country code, or 'any' for no preference.",
- )
- .required(true)
+ ).required(true)
.index(1)
.validator(country_code_validator),
- )
- .arg(
+ ).arg(
clap::Arg::with_name("city")
.help("The three letter city code")
.index(2)
.validator(city_code_validator),
),
- )
- .subcommand(
+ ).subcommand(
clap::SubCommand::with_name("tunnel")
.about("Set tunnel constraints")
.arg(clap::Arg::with_name("port").required(true).index(1))
@@ -88,8 +80,7 @@ impl Command for Relay {
.possible_values(&["any", "udp", "tcp"]),
),
),
- )
- .subcommand(clap::SubCommand::with_name("get"))
+ ).subcommand(clap::SubCommand::with_name("get"))
.subcommand(
clap::SubCommand::with_name("list")
.setting(clap::AppSettings::SubcommandRequired)
diff --git a/mullvad-cli/src/cmds/tunnel.rs b/mullvad-cli/src/cmds/tunnel.rs
index 28af8d38ea..bf7172c655 100644
--- a/mullvad-cli/src/cmds/tunnel.rs
+++ b/mullvad-cli/src/cmds/tunnel.rs
@@ -27,13 +27,10 @@ impl Command for Tunnel {
.help(
"Sets the optional mssfix parameter. \
Set an empty string to clear it.",
- )
- .required(true),
+ ).required(true),
),
- )
- .setting(clap::AppSettings::SubcommandRequired),
- )
- .subcommand(
+ ).setting(clap::AppSettings::SubcommandRequired),
+ ).subcommand(
clap::SubCommand::with_name("get")
.help("Retrieves the current setting for mssfix"),
),