Skip to content

Commit

Permalink
Merge #234
Browse files Browse the repository at this point in the history
234: Remove redundant semicolons r=jonasbb a=jonasbb

Fixes nightly clippy lint

Co-authored-by: Jonas Bushart <jonas@bushart.org>
  • Loading branch information
bors[bot] and jonasbb authored Jan 4, 2021
2 parents a6228ea + 271ee27 commit 99e451f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/de/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ macro_rules! tuple_impl {

Ok(($($t.into_inner(),)+))
}
};
}

deserializer.deserialize_tuple(
$len,
Expand Down Expand Up @@ -355,7 +355,7 @@ macro_rules! array_impl {
},
)*])
}
};
}

deserializer.deserialize_tuple(
$len,
Expand Down Expand Up @@ -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::<T, TAs>::Good(res)) => res.into_inner(),
Expand Down
12 changes: 6 additions & 6 deletions src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ pub mod sets_duplicate_value_is_error {
struct SeqVisitor<T, V> {
marker: PhantomData<T>,
set_item_type: PhantomData<V>,
};
}

impl<'de, T, V> Visitor<'de> for SeqVisitor<T, V>
where
Expand Down Expand Up @@ -670,7 +670,7 @@ pub mod maps_duplicate_key_is_error {
marker: PhantomData<T>,
map_key_type: PhantomData<K>,
map_value_type: PhantomData<V>,
};
}

impl<'de, T, K, V> Visitor<'de> for MapVisitor<T, K, V>
where
Expand Down Expand Up @@ -739,7 +739,7 @@ pub mod sets_first_value_wins {
struct SeqVisitor<T, V> {
marker: PhantomData<T>,
set_item_type: PhantomData<V>,
};
}

impl<'de, T, V> Visitor<'de> for SeqVisitor<T, V>
where
Expand Down Expand Up @@ -808,7 +808,7 @@ pub mod sets_last_value_wins {
struct SeqVisitor<T, V> {
marker: PhantomData<T>,
set_item_type: PhantomData<V>,
};
}

impl<'de, T, V> Visitor<'de> for SeqVisitor<T, V>
where
Expand Down Expand Up @@ -911,7 +911,7 @@ pub mod maps_first_key_wins {
marker: PhantomData<T>,
map_key_type: PhantomData<K>,
map_value_type: PhantomData<V>,
};
}

impl<'de, T, K, V> Visitor<'de> for MapVisitor<T, K, V>
where
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn test_nested_json() {
struct Struct {
#[serde_as(as = "JsonString")]
value: Nested,
};
}

#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
Expand Down
4 changes: 2 additions & 2 deletions tests/serde_as.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn test_option() {
struct Struct {
#[serde_as(as = "_")]
value: Option<u32>,
};
}
check_error_deserialization::<Struct>(
r#"{}"#,
expect![[r#"missing field `value` at line 1 column 2"#]],
Expand Down Expand Up @@ -535,7 +535,7 @@ fn test_default_on_error() {
struct Struct2 {
#[serde_as(as = "DefaultOnError<Vec<DisplayFromStr>>")]
value: Vec<u32>,
};
}
check_deserialization(Struct2 { value: vec![] }, r#"{"value":}"#);

#[serde_as]
Expand Down

0 comments on commit 99e451f

Please sign in to comment.