diff --git a/dizzle b/dizzle index 39eab8d..0f06571 160000 --- a/dizzle +++ b/dizzle @@ -1 +1 @@ -Subproject commit 39eab8d0db2fcadcd7d5e661141a8791d780a876 +Subproject commit 0f06571f7fc7e5f87aadb82d531726d24bf769e8 diff --git a/src/draw.rs b/src/draw.rs index 6a7bc5b..36690f8 100644 --- a/src/draw.rs +++ b/src/draw.rs @@ -150,7 +150,6 @@ features! { layout, lrtb, sizer, - space, split, thunk, xywh diff --git a/src/draw/layout.rs b/src/draw/layout.rs index 28c9541..9074158 100644 --- a/src/draw/layout.rs +++ b/src/draw/layout.rs @@ -1,3 +1,5 @@ +#![allow(unused)] + use crate::*; impl> Layout for T {} diff --git a/src/draw/space.rs b/src/draw/space.rs deleted file mode 100644 index 6576b44..0000000 --- a/src/draw/space.rs +++ /dev/null @@ -1,2 +0,0 @@ -use crate::*; - diff --git a/src/term/buffer.rs b/src/term/buffer.rs index fcd83f1..f95ab52 100644 --- a/src/term/buffer.rs +++ b/src/term/buffer.rs @@ -1,5 +1,4 @@ -use crate::*; -use crate::{*, lang::*, draw::*, task::*, exit::*}; +use crate::lang::*; use ::ratatui::buffer::Cell; /// TUI buffer sized by `usize` instead of `u16`. diff --git a/src/term/colors.rs b/src/term/colors.rs index f224b69..8d63fc2 100644 --- a/src/term/colors.rs +++ b/src/term/colors.rs @@ -1,6 +1,6 @@ use crate::*; use ratatui::prelude::Color; -use dizzle::{Ostensibly, Expression, LanguageError::*}; +use dizzle::{Expression, LanguageError::*}; pub trait ColorDsl: Sized { fn new_g (expr: T, try_to_u8: impl Fn(Perhaps<&str>)->Perhaps) -> Usually; diff --git a/src/term/keys.rs b/src/term/keys.rs index a0ccca8..f4ab04e 100644 --- a/src/term/keys.rs +++ b/src/term/keys.rs @@ -1,10 +1,5 @@ -use crate::{task::Task, term::TuiEvent}; -use ::std::sync::{Arc, RwLock, atomic::{AtomicBool, Ordering::*}}; -use ::std::time::Duration; -use ::dizzle::{Language, Symbol, Usually, Apply}; -use ::crossterm::event::{ - read, Event, KeyEvent, KeyCode, KeyModifiers, KeyEventKind, KeyEventState -}; +use ::dizzle::{Language, Symbol, Usually}; +use ::crossterm::event::{Event, KeyEvent, KeyCode, KeyModifiers, KeyEventKind, KeyEventState}; /// TUI key spec. #[derive(Debug, Clone, Eq, PartialEq, PartialOrd)] diff --git a/src/term/phat.rs b/src/term/phat.rs index ec24914..9d3e6ed 100644 --- a/src/term/phat.rs +++ b/src/term/phat.rs @@ -1,5 +1,3 @@ -use crate::*; - /// Stackably padded. /// /// ``` diff --git a/src/term/repeat.rs b/src/term/repeat.rs index fe989e7..0ea6508 100644 --- a/src/term/repeat.rs +++ b/src/term/repeat.rs @@ -1,5 +1,5 @@ use crate::*; -use ratatui::{prelude::{Style, Position, Backend, Color}}; +use ratatui::{prelude::{Position}}; pub const fn x_repeat (c: &str) -> impl Draw { thunk(move|to: &mut Tui|{ diff --git a/src/term/scroll.rs b/src/term/scroll.rs index 3608237..8900360 100644 --- a/src/term/scroll.rs +++ b/src/term/scroll.rs @@ -1,5 +1,5 @@ use crate::*; -use ratatui::{prelude::{Style, Position, Backend, Color}}; +use ratatui::{prelude::{Position}}; pub const ICON_DEC_V: &[char] = &['▲']; pub const ICON_INC_V: &[char] = &['▼']; @@ -7,7 +7,7 @@ pub const ICON_DEC_H: &[char] = &[' ', '🞀', ' ']; pub const ICON_INC_H: &[char] = &[' ', '🞂', ' ']; pub fn x_scroll () -> impl Draw { - thunk(|Tui(buf, XYWH(x1, y1, w, h)): &mut Tui|{ + thunk(|Tui(buf, XYWH(x1, y1, w, _h)): &mut Tui|{ let x2 = *x1 + *w; for (i, x) in (*x1..=x2).enumerate() { if let Some(cell) = buf.cell_mut(Position::from((x, *y1))) { @@ -35,7 +35,7 @@ pub fn x_scroll () -> impl Draw { } pub fn y_scroll () -> impl Draw { - thunk(|Tui(buf, XYWH(x1, y1, w, h)): &mut Tui|{ + thunk(|Tui(buf, XYWH(x1, y1, _w, h)): &mut Tui|{ let y2 = *y1 + *h; for (i, y) in (*y1..=y2).enumerate() { if let Some(cell) = buf.cell_mut(Position::from((*x1, y))) { diff --git a/src/text.rs b/src/text.rs index 9c00c64..07d438c 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1,3 +1,5 @@ +#![allow(unused)] + use crate::*; pub(crate) use ::unicode_width::*; @@ -96,7 +98,9 @@ pub fn trim_string (max_width: usize, input: impl AsRef) -> String { pub struct TrimString>(pub u16, pub T); impl> AsRef for TrimString { fn as_ref (&self) -> &str { self.1.as_ref() } } impl<'a, T: AsRef> TrimString { - fn to_ref (&self) -> TrimStringRef<'_, T> { TrimStringRef(self.0, &self.1) } + fn to_ref (&self) -> TrimStringRef<'_, T> { + TrimStringRef(self.0, &self.1) + } } /// Displays a borrowed [str]-like with fixed maximum width