From 8970ae5d5d0465536f1d29312faec82561e3e70d Mon Sep 17 00:00:00 2001 From: facile pop culture reference Date: Thu, 30 Jul 2026 14:52:22 +0300 Subject: [PATCH] stylistic --- src/eval.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/eval.rs b/src/eval.rs index 35ec582..950b40c 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -221,7 +221,7 @@ pub fn eval_view <'a, O: Screen + 'a, S> ( /// # Ok(()) } /// ``` pub fn eval_view_tui <'a, S> ( - state: &S, output: &mut Tui, expr: impl Expression + 'a + state: &S, to: &mut Tui, expr: impl Expression + 'a ) -> Perhaps> where S: Interpret>> + for<'b>Namespace<'b, bool> @@ -239,7 +239,7 @@ pub fn eval_view_tui <'a, S> ( match frags.next() { Some("text") => { if let Some(src) = args?.src()? { - output.show(src) + to.show(src) } else { return Ok(None) } @@ -248,11 +248,10 @@ pub fn eval_view_tui <'a, S> ( Some("fg") => { let arg0 = arg0?.expect("fg: expected arg 0 (color)"); if let Some(color) = Namespace::namespace(state, arg0)? { - output.show(fg(color, thunk(move|output: &mut Tui|{ - state.interpret(output, &arg1)?; - // FIXME?: don't max out the used area? - Ok(Some(output.area().into())) - }))) + fg(color, thunk(move|to: &mut Tui|{ + state.interpret(to, &arg1)?; + Ok(Some(to.area().into())) // FIXME?: don't max out the used area? + })).draw(to) } else { return Err(format!("fg: {arg0:?}: not a color").into()) } @@ -261,11 +260,10 @@ pub fn eval_view_tui <'a, S> ( Some("bg") => { let arg0 = arg0?.expect("bg: expected arg 0 (color)"); if let Some(color) = Namespace::namespace(state, arg0)? { - output.show(bg(color, thunk(move|output: &mut Tui|{ - state.interpret(output, &arg1)?; - // FIXME?: don't max out the used area? - Ok(Some(output.area().into())) - }))) + bg(color, thunk(move|to: &mut Tui|{ + state.interpret(to, &arg1)?; + Ok(Some(to.area().into())) // FIXME?: don't max out the used area? + })).draw(to) } else { return Err(format!("bg: {arg0:?}: not a color").into()) }