diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-05 22:28:58 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-05 23:05:25 -0500 |
commit | d70cd4bc46aaa628433b4ad6c6feb48c67a23e6a (patch) | |
tree | 0a64441ab1c62411e5ee42b0aee2bacd5fd7af95 | |
parent | 81ce4a7366a2c92ccae11215b8c5f68838d43a4f (diff) | |
download | vt100-rust-d70cd4bc46aaa628433b4ad6c6feb48c67a23e6a.tar.gz vt100-rust-d70cd4bc46aaa628433b4ad6c6feb48c67a23e6a.zip |
clippy
-rw-r--r-- | src/screen.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screen.rs b/src/screen.rs index b908c45..1cde119 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -1135,7 +1135,7 @@ impl Screen { 23 => self.attrs.set_italic(false), 24 => self.attrs.set_underline(false), 27 => self.attrs.set_inverse(false), - n if n >= 30 && n <= 37 => { + n if (30..=37).contains(&n) => { self.attrs.fgcolor = crate::attrs::Color::Idx(n - 30); } 38 => match next_param!() { @@ -1158,7 +1158,7 @@ impl Screen { 39 => { self.attrs.fgcolor = crate::attrs::Color::Default; } - n if n >= 40 && n <= 47 => { + n if (40..=47).contains(&n) => { self.attrs.bgcolor = crate::attrs::Color::Idx(n - 40); } 48 => match next_param!() { @@ -1181,10 +1181,10 @@ impl Screen { 49 => { self.attrs.bgcolor = crate::attrs::Color::Default; } - n if n >= 90 && n <= 97 => { + n if (90..=97).contains(&n) => { self.attrs.fgcolor = crate::attrs::Color::Idx(n - 82); } - n if n >= 100 && n <= 107 => { + n if (100..=107).contains(&n) => { self.attrs.bgcolor = crate::attrs::Color::Idx(n - 92); } n => { |