diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2024-11-27 10:35:52 +0200 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2024-11-27 10:35:52 +0200 |
| commit | eb01a96121bd4aa20c16650d70dc6f20c85f969d (patch) | |
| tree | de3b4e4c0d4925a5b27f94550bf755a0dcb500ba /src | |
| parent | 0a3f676687fd6cc9c56ed3be975a15b4eb85b0c0 (diff) | |
| download | i3bar-mango-eb01a96121bd4aa20c16650d70dc6f20c85f969d.tar.gz | |
fix clippy lints
Diffstat (limited to 'src')
| -rw-r--r-- | src/color.rs | 2 | ||||
| -rw-r--r-- | src/config.rs | 2 | ||||
| -rw-r--r-- | src/i3bar_protocol.rs | 2 | ||||
| -rw-r--r-- | src/utils.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/color.rs b/src/color.rs index 7cb7964..45dc5b2 100644 --- a/src/color.rs +++ b/src/color.rs @@ -60,7 +60,7 @@ impl<'de> de::Deserialize<'de> for Color { { struct ColorVisitor; - impl<'de> de::Visitor<'de> for ColorVisitor { + impl de::Visitor<'_> for ColorVisitor { type Value = Color; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/config.rs b/src/config.rs index e84607a..48855c8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -225,7 +225,7 @@ impl<'de> de::Deserialize<'de> for Font { { struct FontVisitor; - impl<'de> de::Visitor<'de> for FontVisitor { + impl de::Visitor<'_> for FontVisitor { type Value = Font; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/i3bar_protocol.rs b/src/i3bar_protocol.rs index d7d3f3e..d6b401b 100644 --- a/src/i3bar_protocol.rs +++ b/src/i3bar_protocol.rs @@ -174,7 +174,7 @@ impl<'de> Deserialize<'de> for MinWidth { { struct MinWidthVisitor; - impl<'de> de::Visitor<'de> for MinWidthVisitor { + impl de::Visitor<'_> for MinWidthVisitor { type Value = MinWidth; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/src/utils.rs b/src/utils.rs index 826edc0..a24ed75 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -63,7 +63,7 @@ pub fn de_first_json<'a, T: Deserialize<'a>>( ) -> Result<(Option<T>, &'a [u8]), JsonError> { while s .first() - .map_or(false, |&x| x == b' ' || x == b',' || x == b'\n') + .is_some_and(|&x| x == b' ' || x == b',' || x == b'\n') { s = &s[1..]; } |
