Fix "cannot move out of *self
which is behind a shared reference"
This commit is contained in:
parent
870925d503
commit
1f8c8ad5a3
@ -409,9 +409,9 @@ fn serialize_enum(params: &Parameters, variants: &[Variant], cattrs: &attr::Cont
|
|||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
if cattrs.non_exhaustive() {
|
if cattrs.remote().is_some() && cattrs.non_exhaustive() {
|
||||||
arms.push(quote! {
|
arms.push(quote! {
|
||||||
unrecognized => _serde::__private::Err(_serde::ser::Error::custom(_serde::__private::ser::CannotSerializeVariant(unrecognized))),
|
ref unrecognized => _serde::__private::Err(_serde::ser::Error::custom(_serde::__private::ser::CannotSerializeVariant(unrecognized))),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user