mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 15:25:38 +00:00
Move bounds to where-clause to increase legibility
This commit is contained in:
parent
46a1860601
commit
dd3f653103
@ -736,7 +736,9 @@ macro_rules! map_impl {
|
|||||||
marker: PhantomData<$ty>,
|
marker: PhantomData<$ty>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<$($typaram : $bound1 $(+ $bound2)*),*> $visitor_ty<$($typaram),*> {
|
impl<$($typaram),*> $visitor_ty<$($typaram),*>
|
||||||
|
where $($typaram: $bound1 $(+ $bound2)*),*
|
||||||
|
{
|
||||||
/// Construct a `MapVisitor*<T>`.
|
/// Construct a `MapVisitor*<T>`.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
$visitor_ty {
|
$visitor_ty {
|
||||||
@ -745,7 +747,9 @@ macro_rules! map_impl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<$($typaram : $bound1 $(+ $bound2)*),*> Visitor for $visitor_ty<$($typaram),*> {
|
impl<$($typaram),*> Visitor for $visitor_ty<$($typaram),*>
|
||||||
|
where $($typaram: $bound1 $(+ $bound2)*),*
|
||||||
|
{
|
||||||
type Value = $ty;
|
type Value = $ty;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -771,7 +775,9 @@ macro_rules! map_impl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<$($typaram : $bound1 $(+ $bound2)*),*> Deserialize for $ty {
|
impl<$($typaram),*> Deserialize for $ty
|
||||||
|
where $($typaram: $bound1 $(+ $bound2)*),*
|
||||||
|
{
|
||||||
fn deserialize<D>(deserializer: &mut D) -> Result<$ty, D::Error>
|
fn deserialize<D>(deserializer: &mut D) -> Result<$ty, D::Error>
|
||||||
where D: Deserializer,
|
where D: Deserializer,
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user