From 532a69eb04859631bf3291d7fba367802efa6855 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 21 Feb 2019 09:36:52 +0100 Subject: [PATCH] src/cli/getopts.rs: improve docs --- src/cli.rs | 5 +++-- src/cli/getopts.rs | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index cdb91456..8292c542 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,8 +7,9 @@ mod environment; pub use environment::*; +mod getopts; +pub use getopts::*; + mod command; pub use command::*; -mod getopts; -pub use getopts::*; diff --git a/src/cli/getopts.rs b/src/cli/getopts.rs index 82b388c0..8236c12e 100644 --- a/src/cli/getopts.rs +++ b/src/cli/getopts.rs @@ -52,6 +52,10 @@ fn parse_argument(arg: &str) -> RawArgument { }; } +/// Parses command line arguments using a `Schema` +/// +/// Returns parsed options as json object, together with the +/// list of additional command line arguments. pub fn parse_arguments>( args: &[T], arg_param: &Vec<&'static str>,