fix some warnings in core

This commit is contained in:
🪞👃🪞 2024-10-08 11:29:53 +03:00
parent 5667416d89
commit 7668a6f339
2 changed files with 10 additions and 10 deletions

View file

@ -695,13 +695,13 @@ pub enum Push<N: Number, T: Widget> {
}
impl<N: Number, T: Widget> Push<N, T> {
fn inner (&self) -> &T {
pub fn inner (&self) -> &T {
match self { Self::X(_, i) => i, Self::Y(_, i) => i, Self::XY(_, _, i) => i, }
}
fn x (&self) -> N {
pub fn x (&self) -> N {
match self { Self::X(x, _) => *x, Self::Y(_, _) => N::default(), Self::XY(x, _, _) => *x }
}
fn y (&self) -> N {
pub fn y (&self) -> N {
match self { Self::X(_, _) => N::default(), Self::Y(y, _) => *y, Self::XY(_, y, _) => *y }
}
}
@ -733,13 +733,13 @@ pub enum Pull<N: Number, T: Widget> {
}
impl<N: Number, T: Widget> Pull<N, T> {
fn inner (&self) -> &T {
pub fn inner (&self) -> &T {
match self { Self::X(_, i) => i, Self::Y(_, i) => i, Self::XY(_, _, i) => i, }
}
fn x (&self) -> N {
pub fn x (&self) -> N {
match self { Self::X(x, _) => *x, Self::Y(_, _) => N::default(), Self::XY(x, _, _) => *x }
}
fn y (&self) -> N {
pub fn y (&self) -> N {
match self { Self::X(_, _) => N::default(), Self::Y(y, _) => *y, Self::XY(_, y, _) => *y }
}
}

View file

@ -12,10 +12,10 @@ use crossterm::terminal::{
};
pub struct Tui {
exited: Arc<AtomicBool>,
buffer: Buffer,
backend: CrosstermBackend<Stdout>,
area: [u16;4], // FIXME auto resize
pub exited: Arc<AtomicBool>,
pub buffer: Buffer,
pub backend: CrosstermBackend<Stdout>,
pub area: [u16;4], // FIXME auto resize
}
impl Engine for Tui {
type Unit = u16;