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:
committed by
David Peter
parent
83c9cb7907
commit
de6cb75f4b
@@ -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;
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user