Skip to content

Commit

Permalink
style: simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonThormeyer committed Oct 27, 2024
1 parent ca42916 commit f9951e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions litt/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ fn read(history: &mut Vec<String>) -> Result<InteractiveSearchInput, LittError>
}
terminal::disable_raw_mode()?;
println!();
if history.is_empty() || (!history.is_empty() && history.last().unwrap() != &input_in_progress)
{
if history.is_empty() || (history.last().unwrap() != &input_in_progress) {
history.push(input_in_progress);
}
Ok(input)
Expand Down

0 comments on commit f9951e9

Please sign in to comment.