Skip to content

Commit 03baa47

Browse files
committed
Simplify handling p in list
1 parent da8b3d1 commit 03baa47

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/list.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
7272
}
7373
}
7474
KeyCode::Char('p') => {
75-
let message = if list_state.filter() == Filter::Pending {
75+
if list_state.filter() == Filter::Pending {
7676
list_state.set_filter(Filter::None);
77-
"Disabled filter PENDING"
77+
list_state.message.push_str("Disabled filter PENDING");
7878
} else {
7979
list_state.set_filter(Filter::Pending);
80-
"Enabled filter PENDING │ Press p again to disable the filter"
81-
};
82-
83-
list_state.message.push_str(message);
80+
list_state.message.push_str(
81+
"Enabled filter PENDING │ Press p again to disable the filter",
82+
);
83+
}
8484
}
8585
KeyCode::Char('r') => list_state.reset_selected()?,
8686
KeyCode::Char('c') => {

0 commit comments

Comments
 (0)