on master help sign in
Code review: replace `if let` with equals operator
6615ecegahag
src/output.rs+3−3
@@ -12,7 +12,7 @@ use crate::wrapping::WrappingMode;
12
12
13
13
14#[cfg(feature = "paging")]
14#[cfg(feature = "paging")]
15−#[derive(Debug)]
15+#[derive(Debug, PartialEq)]
16enum SingleScreenAction {
16enum SingleScreenAction {
17 Quit,
17 Quit,
18 Nothing,
18 Nothing,
@@ -93,11 +93,11 @@ impl OutputType {
93 let mut p = Command::new(&pager_path);
93 let mut p = Command::new(&pager_path);
94 if args.is_empty() || replace_arguments_to_less {
94 if args.is_empty() || replace_arguments_to_less {
95 p.arg("--RAW-CONTROL-CHARS");
95 p.arg("--RAW-CONTROL-CHARS");
96− if let SingleScreenAction::Quit = single_screen_action {
96+ if single_screen_action == SingleScreenAction::Quit {
97 p.arg("--quit-if-one-screen");
97 p.arg("--quit-if-one-screen");
98 }
98 }
99
99
100− if let WrappingMode::NoWrapping = wrapping_mode {
100+ if wrapping_mode == WrappingMode::NoWrapping {
101 p.arg("--chop-long-lines");
101 p.arg("--chop-long-lines");
102 }
102 }
103
103