diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2021-09-19 10:03:38 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2021-09-19 10:03:38 -0300 |
commit | 5cf905ee2c079210d7786f8da4f4c834aa37b4a6 (patch) | |
tree | e18e87913d56c9ded2b5be838a1679b55c955791 | |
parent | ef205ef70ad30ec284a81827133e6fa93b542afb (diff) |
Clean up some unused parens
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/maybe.rs | 64 |
2 files changed, 32 insertions, 34 deletions
diff --git a/Cargo.toml b/Cargo.toml index 1c4c931..6f449f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde-util" -version = "0.3.0" +version = "0.3.1" authors = ["SoniEx2 <endermoneymod@gmail.com>"] license-file = "LICENSE.txt" description = "Soni's Serde Utilities" diff --git a/src/maybe.rs b/src/maybe.rs index 27f436b..ed93624 100644 --- a/src/maybe.rs +++ b/src/maybe.rs @@ -1,5 +1,3 @@ -#![allow(unused_parens)] - use std::fmt::Formatter; use serde::Deserialize; @@ -813,7 +811,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_any((visitor)) + inner.deserialize_any(visitor) } fn deserialize_bool<V: Visitor<'de>>( @@ -822,7 +820,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_bool((visitor)) + inner.deserialize_bool(visitor) } fn deserialize_i8<V: Visitor<'de>>( @@ -831,7 +829,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_i8((visitor)) + inner.deserialize_i8(visitor) } fn deserialize_i16<V: Visitor<'de>>( @@ -840,7 +838,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_i16((visitor)) + inner.deserialize_i16(visitor) } fn deserialize_i32<V: Visitor<'de>>( @@ -849,7 +847,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_i32((visitor)) + inner.deserialize_i32(visitor) } fn deserialize_i64<V: Visitor<'de>>( @@ -858,7 +856,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_i64((visitor)) + inner.deserialize_i64(visitor) } fn deserialize_u8<V: Visitor<'de>>( @@ -867,7 +865,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_u8((visitor)) + inner.deserialize_u8(visitor) } fn deserialize_u16<V: Visitor<'de>>( @@ -876,7 +874,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_u16((visitor)) + inner.deserialize_u16(visitor) } fn deserialize_u32<V: Visitor<'de>>( @@ -885,7 +883,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_u32((visitor)) + inner.deserialize_u32(visitor) } fn deserialize_u64<V: Visitor<'de>>( @@ -894,7 +892,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_u64((visitor)) + inner.deserialize_u64(visitor) } fn deserialize_f32<V: Visitor<'de>>( @@ -903,7 +901,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_f32((visitor)) + inner.deserialize_f32(visitor) } fn deserialize_f64<V: Visitor<'de>>( @@ -912,7 +910,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_f64((visitor)) + inner.deserialize_f64(visitor) } fn deserialize_char<V: Visitor<'de>>( @@ -921,7 +919,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_char((visitor)) + inner.deserialize_char(visitor) } fn deserialize_str<V: Visitor<'de>>( @@ -930,7 +928,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_str((visitor)) + inner.deserialize_str(visitor) } fn deserialize_string<V: Visitor<'de>>( @@ -939,7 +937,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_string((visitor)) + inner.deserialize_string(visitor) } fn deserialize_bytes<V: Visitor<'de>>( @@ -948,7 +946,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_bytes((visitor)) + inner.deserialize_bytes(visitor) } fn deserialize_byte_buf<V: Visitor<'de>>( @@ -957,7 +955,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_byte_buf((visitor)) + inner.deserialize_byte_buf(visitor) } fn deserialize_option<V: Visitor<'de>>( @@ -966,7 +964,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_option((visitor)) + inner.deserialize_option(visitor) } fn deserialize_unit<V: Visitor<'de>>( @@ -975,7 +973,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_unit((visitor)) + inner.deserialize_unit(visitor) } fn deserialize_unit_struct<V: Visitor<'de>>( @@ -985,7 +983,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_unit_struct(name, (visitor)) + inner.deserialize_unit_struct(name, visitor) } fn deserialize_newtype_struct<V: Visitor<'de>>( @@ -995,7 +993,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_newtype_struct(name, (visitor)) + inner.deserialize_newtype_struct(name, visitor) } fn deserialize_seq<V: Visitor<'de>>( @@ -1004,7 +1002,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_seq((visitor)) + inner.deserialize_seq(visitor) } fn deserialize_tuple<V: Visitor<'de>>( @@ -1014,7 +1012,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_tuple(len, (visitor)) + inner.deserialize_tuple(len, visitor) } fn deserialize_tuple_struct<V: Visitor<'de>>( @@ -1025,7 +1023,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_tuple_struct(name, len, (visitor)) + inner.deserialize_tuple_struct(name, len, visitor) } fn deserialize_map<V: Visitor<'de>>( @@ -1034,7 +1032,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_map((visitor)) + inner.deserialize_map(visitor) } fn deserialize_struct<V: Visitor<'de>>( @@ -1045,7 +1043,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_struct(name, fields, (visitor)) + inner.deserialize_struct(name, fields, visitor) } fn deserialize_enum<V: Visitor<'de>>( @@ -1056,7 +1054,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_enum(name, variants, (visitor)) + inner.deserialize_enum(name, variants, visitor) } fn deserialize_identifier<V: Visitor<'de>>( @@ -1065,7 +1063,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_identifier((visitor)) + inner.deserialize_identifier(visitor) } fn deserialize_ignored_any<V: Visitor<'de>>( @@ -1074,7 +1072,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_ignored_any((visitor)) + inner.deserialize_ignored_any(visitor) } fn deserialize_i128<V: Visitor<'de>>( @@ -1083,7 +1081,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_i128((visitor)) + inner.deserialize_i128(visitor) } fn deserialize_u128<V: Visitor<'de>>( @@ -1092,7 +1090,7 @@ impl<'a, 'de: 'a, D: Deserializer<'de>> Deserializer<'de> for DeepDer<'a, D> { ) -> Result<V::Value, Self::Error> { let DeepDer(depth, inner) = self; *depth = true; - inner.deserialize_u128((visitor)) + inner.deserialize_u128(visitor) } fn is_human_readable(&self) -> bool { |