summaryrefslogtreecommitdiffhomepage
path: root/mullvad_cli/src
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-07-10 17:00:19 +0200
committerLinus Färnstrand <linus@mullvad.net>2017-07-10 17:00:19 +0200
commit22d6e1347ee8803bf07388d461a90dbeb8fe5c7c (patch)
tree08fa9191ad208b5cfc2259691e7368ce87f0540e /mullvad_cli/src
parent6c5f95b09aac213bb3a51ccd57bb3e2016fda5bd (diff)
downloadmullvadvpn-22d6e1347ee8803bf07388d461a90dbeb8fe5c7c.tar.xz
mullvadvpn-22d6e1347ee8803bf07388d461a90dbeb8fe5c7c.zip
Automatically cast commands with type annotation
Diffstat (limited to 'mullvad_cli/src')
-rw-r--r--mullvad_cli/src/cmds/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/mullvad_cli/src/cmds/mod.rs b/mullvad_cli/src/cmds/mod.rs
index e751c91734..c621c0840a 100644
--- a/mullvad_cli/src/cmds/mod.rs
+++ b/mullvad_cli/src/cmds/mod.rs
@@ -15,11 +15,11 @@ pub use self::disconnect::Disconnect;
/// Returns a map of all available subcommands with their name as key.
pub fn get_commands() -> HashMap<&'static str, Box<Command>> {
- let commands = vec![
- Box::new(Account) as Box<Command>,
- Box::new(Status) as Box<Command>,
- Box::new(Connect) as Box<Command>,
- Box::new(Disconnect) as Box<Command>,
+ let commands: Vec<Box<Command>> = vec![
+ Box::new(Account),
+ Box::new(Status),
+ Box::new(Connect),
+ Box::new(Disconnect),
];
let mut map = HashMap::new();
for cmd in commands {