diff options
author | Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> | 2020-11-07 19:48:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-07 13:48:02 -0500 |
commit | b14942527ac7f839f16523f7fe390fe922c20553 (patch) | |
tree | c1d8274be561327a64c576b6333655e03928c517 /src/ansi/iterator.rs | |
parent | 2ca4b956c3e845b51eed816c78e2fd63c1de779f (diff) |
remove some clippy warnings (#383)
* remove some clippy warnings
* revert comparison_chain clippy lint
Allow it locally
Diffstat (limited to 'src/ansi/iterator.rs')
-rw-r--r-- | src/ansi/iterator.rs | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/ansi/iterator.rs b/src/ansi/iterator.rs index 44fe49fb..1376f9fb 100644 --- a/src/ansi/iterator.rs +++ b/src/ansi/iterator.rs @@ -1,8 +1,5 @@ use core::str::Bytes; -use ansi_term; -use vte; - pub struct AnsiElementIterator<'a> { // The input bytes bytes: Bytes<'a>, @@ -131,19 +128,16 @@ impl vte::Perform for Performer { return; } - match (c, intermediates.get(0)) { - ('m', None) => { - if params.is_empty() { - // Attr::Reset; - } else { - self.element = Some(Element::CSI( - ansi_term_style_from_sgr_parameters(params), - 0, - 0, - )); - } + if let ('m', None) = (c, intermediates.get(0)) { + if params.is_empty() { + // Attr::Reset; + } else { + self.element = Some(Element::CSI( + ansi_term_style_from_sgr_parameters(params), + 0, + 0, + )); } - _ => {} } } |