From 6615eceb185abbcb40279a564f17f074eae68762 Mon Sep 17 00:00:00 2001 From: gahag Date: Wed, 7 Oct 2020 19:14:33 -0300 Subject: [PATCH] Code review: replace `if let` with equals operator --- src/output.rs | 6 +++--- 1 file 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"); }