Skip to content

Commit

Permalink
Remove Config::run (#2320)
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak authored Aug 26, 2024
1 parent f25e2d7 commit 98920b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
5 changes: 4 additions & 1 deletion src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ pub fn run(args: impl Iterator<Item = impl Into<OsString> + 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()));
Expand Down

0 comments on commit 98920b9

Please sign in to comment.