diff options
author | gahag <gabriel.s.b@live.com> | 2020-10-07 19:14:33 -0300 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2020-10-08 18:51:42 +0200 |
commit | 6615eceb185abbcb40279a564f17f074eae68762 (patch) | |
tree | dc903ce7f18543e1a4daa8d4cf4eb17afe6a8409 | |
parent | 53f5a37f01c0c354a552c50aa87a8edf38f9b9f0 (diff) |
Code review: replace `if let` with equals operator
-rw-r--r-- | src/output.rs | 6 |
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"); } |