Code review: replace `if let` with equals operator

This commit is contained in:
gahag 2020-10-07 19:14:33 -03:00 committed by David Peter
parent 53f5a37f01
commit 6615eceb18
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ use crate::wrapping::WrappingMode;
#[cfg(feature = "paging")]
#[derive(Debug)]
#[derive(Debug, PartialEq)]
enum SingleScreenAction {
Quit,
Nothing,
@ -93,11 +93,11 @@ impl OutputType {
let mut p = Command::new(&pager_path);
if args.is_empty() || replace_arguments_to_less {
p.arg("--RAW-CONTROL-CHARS");
if let SingleScreenAction::Quit = single_screen_action {
if single_screen_action == SingleScreenAction::Quit {
p.arg("--quit-if-one-screen");
}
if let WrappingMode::NoWrapping = wrapping_mode {
if wrapping_mode == WrappingMode::NoWrapping {
p.arg("--chop-long-lines");
}