Skip to content

Commit 92a1214

Browse files
committed
passes clippy lints
1 parent 388f8da commit 92a1214

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/list.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
3232
}
3333

3434
list_state.message.clear();
35-
35+
3636
let curr_key = key.code;
37-
37+
3838
if is_searching {
3939
match curr_key {
4040
KeyCode::Esc | KeyCode::Enter => {
@@ -46,18 +46,18 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
4646
list_state.search_query.push(k);
4747
list_state.message.push_str("search:");
4848
list_state.message.push_str(&list_state.search_query);
49-
list_state.message.push_str("|");
50-
49+
list_state.message.push('|');
50+
5151
list_state.select_if_matches_search_query();
52-
52+
5353
list_state.draw(stdout)?;
5454
continue;
5555
}
5656
KeyCode::Backspace => {
5757
list_state.search_query.pop();
5858
list_state.message.push_str("search:");
5959
list_state.message.push_str(&list_state.search_query);
60-
list_state.message.push_str("|");
60+
list_state.message.push('|');
6161

6262
list_state.select_if_matches_search_query();
6363

src/list/state.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a> ListState<'a> {
346346

347347
Ok(())
348348
}
349-
349+
350350
pub fn select_if_matches_search_query(&mut self) {
351351
let idx = self
352352
.app_state
@@ -360,7 +360,7 @@ impl<'a> ListState<'a> {
360360
None
361361
}
362362
});
363-
363+
364364
match idx {
365365
Some(i) => {
366366
// ? do we need this function call?
@@ -375,7 +375,6 @@ impl<'a> ListState<'a> {
375375
self.message.push_str(&msg);
376376
}
377377
}
378-
379378
}
380379

381380
// Return `true` if there was something to select.

0 commit comments

Comments
 (0)