refactor: Renamed KeyEventHandler::with to KeyEventHandler::new to keep with Rust best practices and conventions

This commit is contained in:
2025-01-18 12:43:25 -07:00
parent 5ead5bc3d6
commit fd35106df8
76 changed files with 1161 additions and 1161 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SystemHandler<'a, 'b
fn handle(&mut self) {
match self.active_sonarr_block {
_ if SystemDetailsHandler::accepts(self.active_sonarr_block) => {
SystemDetailsHandler::with(self.key, self.app, self.active_sonarr_block, self.context)
SystemDetailsHandler::new(self.key, self.app, self.active_sonarr_block, self.context)
.handle()
}
_ => self.handle_key_event(),
@@ -35,7 +35,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SystemHandler<'a, 'b
SystemDetailsHandler::accepts(active_block) || active_block == ActiveSonarrBlock::System
}
fn with(
fn new(
key: Key,
app: &'a mut App<'b>,
active_block: ActiveSonarrBlock,