More verbosity reduction
Some checks failed
Cargo CI / Build and Test (pull_request) Failing after 1m41s
Cargo CI / Lint (pull_request) Successful in 1m7s

This commit is contained in:
Wojciech Kozlowski 2024-09-14 23:08:06 +02:00
parent d5716b79e2
commit 4c39988d96
2 changed files with 4 additions and 28 deletions

View File

@ -26,7 +26,7 @@ use match_state::MatchState;
use reload_state::ReloadState; use reload_state::ReloadState;
use search_state::SearchState; use search_state::SearchState;
use super::{AppMode, IAppBase}; use super::{AppMode, IAppBase, IAppState};
pub type App = AppState< pub type App = AppState<
AppMachine<BrowseState>, AppMachine<BrowseState>,
@ -130,36 +130,11 @@ impl IApp for App {
self self
} }
fn state( fn state(self) -> IAppState!() {
self,
) -> AppState<
Self::BrowseState,
Self::InfoState,
Self::ReloadState,
Self::SearchState,
Self::FetchState,
Self::MatchState,
Self::ErrorState,
Self::CriticalState,
> {
self self
} }
fn mode( fn mode(mut self) -> super::AppMode<IAppState!(), Self::InputMode> {
mut self,
) -> super::AppMode<
AppState<
Self::BrowseState,
Self::InfoState,
Self::ReloadState,
Self::SearchState,
Self::FetchState,
Self::MatchState,
Self::ErrorState,
Self::CriticalState,
>,
Self::InputMode,
> {
if let Some(input) = self.inner_mut().input.take() { if let Some(input) = self.inner_mut().input.take() {
AppMode::Input(AppInputMode::new(input, self.state())) AppMode::Input(AppInputMode::new(input, self.state()))
} else { } else {

View File

@ -30,6 +30,7 @@ macro_rules! IAppState {
Self::FetchState, Self::MatchState, Self::ErrorState, Self::CriticalState> Self::FetchState, Self::MatchState, Self::ErrorState, Self::CriticalState>
}; };
} }
use IAppState;
pub trait IApp { pub trait IApp {
type BrowseState: IAppBase<APP = Self> + IAppInteractBrowse<APP = Self>; type BrowseState: IAppBase<APP = Self> + IAppInteractBrowse<APP = Self>;