The exec() function of an ExecutableCommand should get the CLI matches as well

This commit is contained in:
Matthias Beyer 2015-11-24 20:04:43 +01:00
parent 4af971a5d0
commit f94f8870e9

View file

@ -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<ModuleError, CommandError>>;
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;
}