Code review: replace `if let` with equals operator

pull/1294/head
gahag 4 years ago committed by David Peter
parent 53f5a37f01
commit 6615eceb18

@ -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");
}

Loading…
Cancel
Save