mirror of
https://github.com/sharkdp/bat
synced 2025-02-17 05:18:28 +00:00
Code review: replace if let
with equals operator
This commit is contained in:
parent
53f5a37f01
commit
6615eceb18
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue