summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgahag <gabriel.s.b@live.com>2020-10-07 19:14:33 -0300
committerDavid Peter <sharkdp@users.noreply.github.com>2020-10-08 18:51:42 +0200
commit6615eceb185abbcb40279a564f17f074eae68762 (patch)
treedc903ce7f18543e1a4daa8d4cf4eb17afe6a8409
parent53f5a37f01c0c354a552c50aa87a8edf38f9b9f0 (diff)
Code review: replace `if let` with equals operator
-rw-r--r--src/output.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output.rs b/src/output.rs
index 1e84e946..8bbdbc61 100644
--- a/src/output.rs
+++ b/src/output.rs
@@ -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");
}