diff options
author | mark chaitin <markchaitin@gmail.com> | 2021-01-08 18:23:11 -0500 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-01-09 15:21:26 +0100 |
commit | de6cb75f4bb5d6e65301b5e9a9890228760da4c4 (patch) | |
tree | 9c1ff8bc1a647ba70bf4eedf38cea42edba9b3fa /src | |
parent | 83c9cb7907a7a6ea48c7c76d51e5a7b0332bf398 (diff) |
Addressed PR feedback. Upped min version and used matches! macro
Diffstat (limited to 'src')
-rw-r--r-- | src/printer.rs | 4 | ||||
-rw-r--r-- | src/wrapping.rs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/printer.rs b/src/printer.rs index c4076a98..45caf157 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -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; diff --git a/src/wrapping.rs b/src/wrapping.rs index b854ce75..57201750 100644 --- a/src/wrapping.rs +++ b/src/wrapping.rs @@ -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 { |