From f94f8870e9d48234dcc09fc4d28f0f8a81f52ee5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 24 Nov 2015 20:04:43 +0100 Subject: [PATCH] The exec() function of an ExecutableCommand should get the CLI matches as well --- src/module/command.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/module/command.rs b/src/module/command.rs index 729f52a4..09d2792d 100644 --- a/src/module/command.rs +++ b/src/module/command.rs @@ -1,5 +1,8 @@ use std::result::Result; +use clap::ArgMatches; + +use runtime::Runtime; use super::ModuleError; use storage::backend::{StorageBackend, StorageBackendError}; @@ -8,5 +11,8 @@ pub type CommandResult = Result<(), Result>; pub trait ExecutableCommand { fn get_callname() -> &'static str; - fn exec(&self, rt: &Runtime, s: StorageBackend) -> CommandResult; + fn exec(&self, + rt: &Runtime, + matches: &ArgMatches<'a, 'a>, + s: StorageBackend) -> CommandResult; }