mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip: restabilizing inversion of control shenanigans again
Some checks are pending
/ build (push) Waiting to run
Some checks are pending
/ build (push) Waiting to run
This commit is contained in:
parent
4a2e742e56
commit
287983c140
6 changed files with 99 additions and 111 deletions
|
|
@ -12,8 +12,10 @@ pub struct Pool {
|
|||
/// Embedded file browser
|
||||
pub browser: Option<Browser>,
|
||||
}
|
||||
from_dsl!(BrowserCommand: |state: Pool, iter|Ok(state.browser
|
||||
.as_ref().map(|p|Take::take(p, iter)).transpose()?.flatten()));
|
||||
take!(BrowserCommand |state: Pool, iter|Ok(state.browser.as_ref()
|
||||
.map(|p|Take::take(p, iter))
|
||||
.transpose()?
|
||||
.flatten()));
|
||||
impl Default for Pool {
|
||||
fn default () -> Self {
|
||||
use PoolMode::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue