mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-04-04 05:50:44 +02:00
wip: test: fixing up the tests
- should bring back the rest of the mental model - and allow me to prune it!
This commit is contained in:
parent
ce2eeaee7f
commit
2a7e981b9c
5 changed files with 93 additions and 95 deletions
|
|
@ -4,10 +4,10 @@ use rand::{thread_rng, distributions::uniform::UniformSampler};
|
|||
|
||||
impl Tui {
|
||||
/// Create and launch a terminal user interface.
|
||||
pub fn run <T: Send + Sync + Handle<TuiIn> + Draw<TuiOut> + 'static> (
|
||||
state: &Arc<RwLock<T>>
|
||||
) -> Usually<Arc<RwLock<Self>>> {
|
||||
tui_run(state)
|
||||
pub fn run <T> (join: bool, state: T) -> Usually<Arc<RwLock<Self>>> where
|
||||
T: Handle<TuiIn> + Draw<TuiOut> + Send + Sync + 'static
|
||||
{
|
||||
tui_run(join, &Arc::new(RwLock::new(state)))
|
||||
}
|
||||
/// True if done
|
||||
pub fn exited (&self) -> bool { self.exited.fetch_and(true, Relaxed) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue