fix warnings

This commit is contained in:
facile pop culture reference 2026-09-17 09:49:32 +03:00
parent 5272b8ec55
commit 3a55f2fb18
5 changed files with 9 additions and 10 deletions

2
dizzle

@ -1 +1 @@
Subproject commit 3d04622e4266eac65021da6cd3d378e84a843b87 Subproject commit b0299735e58bd1b79db5bbb033956e437a1e56ef

View file

@ -14,8 +14,8 @@ use Azimuth::*;
} }
pub struct Origin<T>( pub struct Origin<T>(
pub(crate) Option<Azimuth>, pub Option<Azimuth>,
pub(crate) T pub T
); );
impl<'a, S: Screen, T: Draw<S>> Draw<S> for Origin<T> { impl<'a, S: Screen, T: Draw<S>> Draw<S> for Origin<T> {
@ -199,14 +199,16 @@ impl<S: Screen, A: Draw<S>, B: Draw<S>> Draw<S> for Bar<S::Unit, A, B> {
fn draw (&self, to: &mut S) -> Drawn<S::Unit> { fn draw (&self, to: &mut S) -> Drawn<S::Unit> {
#[cfg(feature = "prof")] profiling::scope!("bar_draw"); #[cfg(feature = "prof")] profiling::scope!("bar_draw");
let Self(split, n, a, b, ..) = self; let Self(split, n, a, b, ..) = self;
let (area_a, area_b) = bar_areas(to, split, *n, a, b)?; let (area_a, area_b) = bar_areas(to, split, *n)?;
let (drawn_a, drawn_b) = draw_stacks(split, to, a, area_a, None, b, area_b, None)?; let (drawn_a, drawn_b) = draw_stacks(split, to, a, area_a, None, b, area_b, None)?;
Ok(stack_drawn(split, drawn_a, drawn_b)) Ok(stack_drawn(split, drawn_a, drawn_b))
} }
} }
pub fn bar_areas <'a, S: Screen> ( pub fn bar_areas <'a, S: Screen> (
to: &mut S, split: &Split, n: S::Unit, a: impl Draw<S>, b: impl Draw<S>, to: &mut S,
split: &Split,
n: S::Unit,
) -> UsuallyRef<'a, (Option<XYWH<S::Unit>>, Option<XYWH<S::Unit>>)> { ) -> UsuallyRef<'a, (Option<XYWH<S::Unit>>, Option<XYWH<S::Unit>>)> {
let XYWH(x0, y0, w0, h0) = to.area(); let XYWH(x0, y0, w0, h0) = to.area();
Ok(match split { Ok(match split {

View file

@ -29,7 +29,6 @@ mod modify; pub use self::modify::*;
mod phat; pub use self::phat::*; mod phat; pub use self::phat::*;
mod repeat; pub use self::repeat::*; mod repeat; pub use self::repeat::*;
mod scroll; pub use self::scroll::*; mod scroll; pub use self::scroll::*;
#[cfg(feature = "text")] mod text;
#[macro_export] macro_rules! tui_app { #[macro_export] macro_rules! tui_app {
($Struct:ident { $($fields:tt)* }) => { ($Struct:ident { $($fields:tt)* }) => {

View file

@ -1 +0,0 @@
use crate::*;

View file

@ -1,4 +1,3 @@
use crate::*;
pub(crate) use ::unicode_width::*; pub(crate) use ::unicode_width::*;
/// Displays a multi-line text string. /// Displays a multi-line text string.
@ -21,7 +20,7 @@ impl<T: AsRef<str>> AsRef<str> for TrimString<T> {
} }
impl<'a, T: AsRef<str>> TrimString<T> { impl<'a, T: AsRef<str>> TrimString<T> {
fn to_ref (&self) -> TrimStr<'_, T> { pub fn to_ref (&self) -> TrimStr<'_, T> {
TrimStr(self.0, &self.1) TrimStr(self.0, &self.1)
} }
} }
@ -193,7 +192,7 @@ mod text_term {
} }
} }
fn layout_text_u16 (text: &str, area: XYWH<u16>) -> Perhaps<XYWH<u16>> { pub fn layout_text_u16 (text: &str, area: XYWH<u16>) -> Perhaps<XYWH<u16>> {
let XYWH(x, y, w, h) = area; let XYWH(x, y, w, h) = area;
let mut max_w = 0u16; let mut max_w = 0u16;
let mut max_h = 0u16; let mut max_h = 0u16;