diff --git a/libimagrt/src/runtime.rs b/libimagrt/src/runtime.rs index 0ec1de19..3907a60a 100644 --- a/libimagrt/src/runtime.rs +++ b/libimagrt/src/runtime.rs @@ -92,19 +92,26 @@ impl<'a> Runtime<'a> { } }; - Runtime::with_configuration(cli_app, config) + Runtime::_new(cli_app, matches, config) } /// Builds the Runtime object using the given `config`. - pub fn with_configuration(mut cli_app: C, config: Option) -> Result, RuntimeError> + pub fn with_configuration(cli_app: C, config: Option) + -> Result, RuntimeError> where C: Clone + CliSpec<'a> + InternalConfiguration + { + let matches = cli_app.clone().matches(); + Runtime::_new(cli_app, matches, config) + } + + fn _new(mut cli_app: C, matches: ArgMatches<'a>, config: Option) + -> Result, RuntimeError> + where C: Clone + CliSpec<'a> + InternalConfiguration { use std::io::stdout; use clap::Shell; - let matches = cli_app.clone().matches(); - let is_debugging = matches.is_present(Runtime::arg_debugging_name()); if cli_app.enable_logging() {