mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 19:56:44 +01:00
simplify
This commit is contained in:
parent
291b917970
commit
238ac2e888
25 changed files with 1018 additions and 1147 deletions
|
|
@ -3,7 +3,6 @@ use std::time::Duration;
|
|||
|
||||
mod tui_buffer; pub use self::tui_buffer::*;
|
||||
mod tui_input; pub use self::tui_input::*;
|
||||
mod tui_keys; pub use self::tui_keys::*;
|
||||
mod tui_output; pub use self::tui_output::*;
|
||||
mod tui_perf; pub use self::tui_perf::*;
|
||||
|
||||
|
|
@ -72,8 +71,7 @@ pub trait TuiRun<R: Render<TuiOut> + Handle<TuiIn> + 'static> {
|
|||
fn run (&self, state: &Arc<RwLock<R>>) -> Usually<()>;
|
||||
}
|
||||
|
||||
impl<T: Render<TuiOut> + Handle<TuiIn> + Send + Sync + 'static>
|
||||
TuiRun<T> for Arc<RwLock<Tui>> {
|
||||
impl<T: Render<TuiOut> + Handle<TuiIn> + Send + Sync + 'static> TuiRun<T> for Arc<RwLock<Tui>> {
|
||||
fn run (&self, state: &Arc<RwLock<T>>) -> Usually<()> {
|
||||
let _input_thread = TuiIn::run_input(self, state, Duration::from_millis(100));
|
||||
self.write().unwrap().setup()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue