1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

Addressed PR feedback. Upped min version and used matches! macro

This commit is contained in:
mark chaitin
2021-01-08 18:23:11 -05:00
committed by David Peter
parent 83c9cb7907
commit de6cb75f4b
6 changed files with 49 additions and 49 deletions

View File

@@ -424,9 +424,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
}
// Line contents.
if self.config.wrapping_mode == WrappingMode::NoWrapping(false)
|| self.config.wrapping_mode == WrappingMode::NoWrapping(true)
{
if matches!(self.config.wrapping_mode, WrappingMode::NoWrapping(_)) {
let true_color = self.config.true_color;
let colored_output = self.config.colored_output;
let italics = self.config.use_italic_text;

View File

@@ -1,7 +1,8 @@
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum WrappingMode {
Character,
NoWrapping(bool), // explicitly opted in or not
// The bool specifies whether wrapping has been explicitly disabled by the user via --wrap=never
NoWrapping(bool),
}
impl Default for WrappingMode {