chiark / gitweb /
clippy: Miscellaneous minor changes, and allow lints
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 31 Mar 2022 19:12:40 +0000 (20:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 31 Mar 2022 19:12:40 +0000 (20:12 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
clippy-options
src/toml-de.rs

index aa74807021176f5a13e92455be58da98ed20058f..83346a952759df92ce9e437b8981f57fe74d8472 100644 (file)
@@ -33,3 +33,4 @@
 -A clippy::map_flatten
 -A clippy::manual_split_once
 -A clippy::expect_fun_call
+-A clippy::manual_map
index 9efa5ad3baf7384eae8d5b94b277a679acce6b74..a1310e1709454e340f81e82734be3301827f396f 100644 (file)
@@ -113,12 +113,12 @@ impl<'de> VariantAccess<'de> for TomlDe<'de> {
 
   #[throws(Error)]
   fn tuple_variant<V: Visitor<'de>>(self, _: usize, v: V) -> V::Value {
-    visit(v, &self.0)?
+    visit(v, self.0)?
   }
 
   #[throws(Error)]
   fn struct_variant<V: Visitor<'de>>(self, _:&[&str], v: V) -> V::Value {
-    visit(v, &self.0)?
+    visit(v, self.0)?
   }
 }
 
@@ -140,7 +140,7 @@ impl<'de> Deserializer<'de> for TomlDe<'de> {
   type Error = Error;
   #[throws(Error)]
   fn deserialize_any<V: Visitor<'de>>(self, visitor: V) -> V::Value {
-    visit(visitor, &self.0)?
+    visit(visitor, self.0)?
   }
   #[throws(Error)]
   fn deserialize_option<V: Visitor<'de>>(self, visitor: V) -> V::Value {
@@ -166,7 +166,7 @@ impl<'de> Deserializer<'de> for TomlDe<'de> {
       _ => {}
     }
     // hopefully the format will figure it out, or produce an error
-    visit(vi, &self.0)?
+    visit(vi, self.0)?
   }
   forward_to_deserialize_any! {
     bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string