read explicit lifetime to FromDsl
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-05-20 22:02:51 +03:00
parent 7c1cddc759
commit 455d6d00d5
14 changed files with 252 additions and 286 deletions

View file

@ -72,7 +72,8 @@ pub trait TuiRun<R: Render<TuiOut> + Handle<TuiIn> + 'static> {
fn run (&self, state: &Arc<RwLock<R>>) -> Usually<()>;
}
impl<T: Render<TuiOut> + Handle<TuiIn> + '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()?;

View file

@ -21,7 +21,7 @@ impl Input for TuiIn {
impl TuiIn {
/// Spawn the input thread.
pub fn run_input <T: Handle<TuiIn> + 'static> (
pub fn run_input <T: Handle<TuiIn> + Send + Sync + 'static> (
engine: &Arc<RwLock<Tui>>,
state: &Arc<RwLock<T>>,
timer: Duration