From 694387e66e228eee16cdfdca9a1814ece3af9225 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Mon, 26 Aug 2024 02:47:12 -0700 Subject: [PATCH] Remove Config::run --- src/config.rs | 5 ----- src/run.rs | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/config.rs b/src/config.rs index bf8c58f67a..67f24524c4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -748,11 +748,6 @@ impl Config { Err(Error::UnstableFeature { unstable_feature }) } } - - pub(crate) fn run(self, loader: &Loader) -> RunResult { - InterruptHandler::install(self.verbosity).ok(); - self.subcommand.execute(&self, loader) - } } #[cfg(test)] diff --git a/src/run.rs b/src/run.rs index d408dfba3e..49b2725d2d 100644 --- a/src/run.rs +++ b/src/run.rs @@ -23,7 +23,10 @@ pub fn run(args: impl Iterator + Clone>) -> Result<() let loader = Loader::new(); config - .and_then(|config| config.run(&loader)) + .and_then(|config| { + InterruptHandler::install(config.verbosity).ok(); + config.subcommand.execute(&config, &loader) + }) .map_err(|error| { if !verbosity.quiet() && error.print_message() { eprintln!("{}", error.color_display(color.stderr()));