diff options
| author | David Lönnhager <david.l@mullvad.net> | 2019-12-11 09:42:26 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2019-12-17 12:30:15 +0100 |
| commit | a360edc98954e41e3280a44bb1a5e54507ad48eb (patch) | |
| tree | b663772d42d34f5faa6ccc0f65ce25f579b2c56e /mullvad-cli/src | |
| parent | 23ab1435382e8bca865e154ec440fb8847ab5b78 (diff) | |
| download | mullvadvpn-a360edc98954e41e3280a44bb1a5e54507ad48eb.tar.xz mullvadvpn-a360edc98954e41e3280a44bb1a5e54507ad48eb.zip | |
Format Rust code
Diffstat (limited to 'mullvad-cli/src')
| -rw-r--r-- | mullvad-cli/src/cmds/tunnel.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mullvad-cli/src/cmds/tunnel.rs b/mullvad-cli/src/cmds/tunnel.rs index 24949b95e2..c1e1e174e1 100644 --- a/mullvad-cli/src/cmds/tunnel.rs +++ b/mullvad-cli/src/cmds/tunnel.rs @@ -134,7 +134,9 @@ impl Tunnel { ("generate", _) => Self::process_wireguard_key_generate(), ("automatic-rotation", Some(matches)) => match matches.subcommand() { ("get", _) => Self::process_wireguard_automatic_rotation_get(), - ("set", Some(matches)) => Self::process_wireguard_automatic_rotation_set(matches), + ("set", Some(matches)) => { + Self::process_wireguard_automatic_rotation_set(matches) + } ("unset", _) => Self::process_wireguard_automatic_rotation_unset(), _ => unreachable!("unhandled command"), }, @@ -217,7 +219,8 @@ impl Tunnel { } fn process_wireguard_automatic_rotation_set(matches: &clap::ArgMatches<'_>) -> Result<()> { - let rotate_interval = value_t!(matches.value_of("interval"), u32).unwrap_or_else(|e| e.exit()); + let rotate_interval = + value_t!(matches.value_of("interval"), u32).unwrap_or_else(|e| e.exit()); let mut rpc = new_rpc_client()?; rpc.set_wireguard_automatic_rotation(Some(rotate_interval))?; println!("Wireguard automatic key rotation has been updated"); |
