diff --git a/src/main.rs b/src/main.rs index 16463d5..1cbf1e0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,10 +136,8 @@ where if let CurrentWidget::TrxList = app.current_widget && app.selected_tab == 1 { - let char_u = key.code.to_string().parse::(); - match char_u { - Ok(c) => app.select_tr_type_chart(c), - _ => {} + if let Ok(c) = key.code.to_string().parse::() { + app.select_tr_type_chart(c); } } }