mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 20:38:44 +00:00
Code review: replace if let
with equals operator
This commit is contained in:
parent
53f5a37f01
commit
6615eceb18
@ -12,7 +12,7 @@ use crate::wrapping::WrappingMode;
|
|||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "paging")]
|
#[cfg(feature = "paging")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq)]
|
||||||
enum SingleScreenAction {
|
enum SingleScreenAction {
|
||||||
Quit,
|
Quit,
|
||||||
Nothing,
|
Nothing,
|
||||||
@ -93,11 +93,11 @@ impl OutputType {
|
|||||||
let mut p = Command::new(&pager_path);
|
let mut p = Command::new(&pager_path);
|
||||||
if args.is_empty() || replace_arguments_to_less {
|
if args.is_empty() || replace_arguments_to_less {
|
||||||
p.arg("--RAW-CONTROL-CHARS");
|
p.arg("--RAW-CONTROL-CHARS");
|
||||||
if let SingleScreenAction::Quit = single_screen_action {
|
if single_screen_action == SingleScreenAction::Quit {
|
||||||
p.arg("--quit-if-one-screen");
|
p.arg("--quit-if-one-screen");
|
||||||
}
|
}
|
||||||
|
|
||||||
if let WrappingMode::NoWrapping = wrapping_mode {
|
if wrapping_mode == WrappingMode::NoWrapping {
|
||||||
p.arg("--chop-long-lines");
|
p.arg("--chop-long-lines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user