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<()> {
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();
CrosstermBackend::new(stdout()).show_cursor().unwrap();
disable_raw_mode().unwrap();

View file

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