diff --git a/src/cli.rs b/src/cli.rs index 4b00cbb..9607dd1 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -29,7 +29,7 @@ pub enum Cmd { /// Launch the handler for specified extension/mime with optional arguments Launch { mime: MimeOrExtension, - args: Vec, + args: Vec, }, /// Get handler for this mime/extension diff --git a/src/main.rs b/src/main.rs index 1c99069..4bc38d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,8 +12,8 @@ mod utils; fn main() -> Result<()> { use clap::Clap; use cli::Cmd; - use common::{Handler}; - use std::{collections::HashMap}; + use common::Handler; + use std::collections::HashMap; // create config if it doesn't exist Lazy::force(&CONFIG); @@ -31,7 +31,7 @@ fn main() -> Result<()> { apps.save()?; } Cmd::Launch { mime, args } => { - apps.get_handler(&mime.0)?.launch(args)?; + apps.get_handler(&mime.0)?.launch(args.into_iter().map(|a| a.to_string()).collect())?; } Cmd::Get { mime, json } => { apps.show_handler(&mime.0, json)?;