fix warnings

This commit is contained in:
🪞👃🪞 2024-10-26 21:13:48 +03:00
parent 8fb5417c22
commit b4015a727a
2 changed files with 2 additions and 4 deletions

View file

@ -29,7 +29,7 @@ impl Engine for Tui {
} }
fn setup (&mut self) -> Usually<()> { fn setup (&mut self) -> Usually<()> {
let better_panic_handler = Settings::auto().verbosity(Verbosity::Full).create_panic_handler(); let better_panic_handler = Settings::auto().verbosity(Verbosity::Full).create_panic_handler();
std::panic::set_hook(Box::new(move |info: &std::panic::PanicInfo|{ std::panic::set_hook(Box::new(move |info: &std::panic::PanicHookInfo|{
stdout().execute(LeaveAlternateScreen).unwrap(); stdout().execute(LeaveAlternateScreen).unwrap();
CrosstermBackend::new(stdout()).show_cursor().unwrap(); CrosstermBackend::new(stdout()).show_cursor().unwrap();
disable_raw_mode().unwrap(); disable_raw_mode().unwrap();

View file

@ -49,9 +49,7 @@ impl Content for PhrasePool<Tui> {
impl Content for PhraseEditor<Tui> { impl Content for PhraseEditor<Tui> {
type Engine = Tui; type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> { fn content (&self) -> impl Widget<Engine = Tui> {
let Self { let Self { focused, entered, keys, phrase, buffer, note_len, .. } = self;
focused, entered, time_axis, note_axis, keys, phrase, buffer, note_len, ..
} = self;
let FixedAxis { let FixedAxis {
start: note_start, point: note_point, clamp: note_clamp start: note_start, point: note_point, clamp: note_clamp
} = *self.note_axis.read().unwrap(); } = *self.note_axis.read().unwrap();