mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
fix some warnings in core
This commit is contained in:
parent
5667416d89
commit
7668a6f339
2 changed files with 10 additions and 10 deletions
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue