Clear up call

This commit is contained in:
Wojciech Kozlowski 2024-09-06 22:41:46 +02:00
parent 405d16cbf9
commit 616f4c9f35
2 changed files with 8 additions and 4 deletions

View File

@ -69,10 +69,14 @@ impl AppMachine<AppFetch> {
};
let fetch = AppFetch::new(fetch_rx);
AppMachine::app_fetch_next(inner, fetch, true)
AppMachine::app_fetch(inner, fetch, true)
}
pub fn app_fetch_next(inner: AppInner, fetch: AppFetch, first: bool) -> App {
pub fn app_fetch_next(inner: AppInner, fetch: AppFetch) -> App {
Self::app_fetch(inner, fetch, false)
}
pub fn app_fetch(inner: AppInner, fetch: AppFetch, first: bool) -> App {
match fetch.fetch_rx.try_recv() {
Ok(fetch_result) => match fetch_result {
Ok(next_match) => {
@ -176,7 +180,7 @@ impl IAppEventFetch for AppMachine<AppFetch> {
type APP = App;
fn fetch_result_ready(self) -> Self::APP {
Self::app_fetch_next(self.inner, self.state, false)
Self::app_fetch_next(self.inner, self.state)
}
}

View File

@ -116,7 +116,7 @@ impl IAppInteractMatches for AppMachine<AppMatches> {
}
fn select(self) -> Self::APP {
AppMachine::app_fetch_next(self.inner, self.state.fetch, false)
AppMachine::app_fetch_next(self.inner, self.state.fetch)
}
fn abort(self) -> Self::APP {