Reformat code for basic_view.rs that fix a common mistake
use crate::{app::App, event::Key, network::IoEvent};
pub fn handler(key: Key, app: &mut App) {
- match key {
- Key::Char('s') => {
+ if let Key::Char('s') = key {
if let Some(playing_context) = &app.current_playback_context {
if let Some(track) = &playing_context.clone().item {
if let Some(id) = &track.id {
@@ -11,6 +10,4 @@ pub fn handler(key: Key, app: &mut App) {
}
}
}
- _ => {}
- };
}
