From 271ee27665d5afceb621830d5b913284f94a43e1 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Mon, 4 Jan 2021 15:11:01 +0100 Subject: [PATCH] Remove redundant semicolons Fixes nightly clippy lint --- src/de/impls.rs | 6 +++--- src/rust.rs | 12 ++++++------ tests/json.rs | 2 +- tests/serde_as.rs | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/de/impls.rs b/src/de/impls.rs index bf80f201..34a0d47b 100644 --- a/src/de/impls.rs +++ b/src/de/impls.rs @@ -290,7 +290,7 @@ macro_rules! tuple_impl { Ok(($($t.into_inner(),)+)) } - }; + } deserializer.deserialize_tuple( $len, @@ -355,7 +355,7 @@ macro_rules! array_impl { }, )*]) } - }; + } deserializer.deserialize_tuple( $len, @@ -650,7 +650,7 @@ where // like integer or string, the deserializer sees a list or map. Error(IgnoredAny), _JustAMarkerForTheLifetime(PhantomData<&'a u32>), - }; + } Ok(match Deserialize::deserialize(deserializer) { Ok(GoodOrError::::Good(res)) => res.into_inner(), diff --git a/src/rust.rs b/src/rust.rs index 519cf71c..058d56ce 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -566,7 +566,7 @@ pub mod sets_duplicate_value_is_error { struct SeqVisitor { marker: PhantomData, set_item_type: PhantomData, - }; + } impl<'de, T, V> Visitor<'de> for SeqVisitor where @@ -670,7 +670,7 @@ pub mod maps_duplicate_key_is_error { marker: PhantomData, map_key_type: PhantomData, map_value_type: PhantomData, - }; + } impl<'de, T, K, V> Visitor<'de> for MapVisitor where @@ -739,7 +739,7 @@ pub mod sets_first_value_wins { struct SeqVisitor { marker: PhantomData, set_item_type: PhantomData, - }; + } impl<'de, T, V> Visitor<'de> for SeqVisitor where @@ -808,7 +808,7 @@ pub mod sets_last_value_wins { struct SeqVisitor { marker: PhantomData, set_item_type: PhantomData, - }; + } impl<'de, T, V> Visitor<'de> for SeqVisitor where @@ -911,7 +911,7 @@ pub mod maps_first_key_wins { marker: PhantomData, map_key_type: PhantomData, map_value_type: PhantomData, - }; + } impl<'de, T, K, V> Visitor<'de> for MapVisitor where @@ -1714,7 +1714,7 @@ pub mod default_on_error { // This is necessary to make this work, when instead of having a direct value // like integer or string, the deserializer sees a list or map. Error(serde::de::IgnoredAny), - }; + } Ok(match Deserialize::deserialize(deserializer) { Ok(GoodOrError::Good(res)) => res, diff --git a/tests/json.rs b/tests/json.rs index 30e1ead5..0f4ff8ec 100644 --- a/tests/json.rs +++ b/tests/json.rs @@ -12,7 +12,7 @@ fn test_nested_json() { struct Struct { #[serde_as(as = "JsonString")] value: Nested, - }; + } #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] diff --git a/tests/serde_as.rs b/tests/serde_as.rs index 4af1eb3e..7981db81 100644 --- a/tests/serde_as.rs +++ b/tests/serde_as.rs @@ -48,7 +48,7 @@ fn test_option() { struct Struct { #[serde_as(as = "_")] value: Option, - }; + } check_error_deserialization::( r#"{}"#, expect![[r#"missing field `value` at line 1 column 2"#]], @@ -535,7 +535,7 @@ fn test_default_on_error() { struct Struct2 { #[serde_as(as = "DefaultOnError>")] value: Vec, - }; + } check_deserialization(Struct2 { value: vec![] }, r#"{"value":}"#); #[serde_as]