Fix: Use &[T]
instead of &Vec<T>
This commit is contained in:
parent
3c7dd6fc1e
commit
df4ad5884d
@ -710,7 +710,7 @@ fn serialize_adjacently_tagged_variant(
|
||||
});
|
||||
|
||||
let fields_ty = variant.fields.iter().map(|f| &f.ty);
|
||||
let fields_ident: &Vec<_> = &match variant.style {
|
||||
let fields_ident: &[_] = &match variant.style {
|
||||
Style::Unit => {
|
||||
if variant.attrs.serialize_with().is_some() {
|
||||
vec![]
|
||||
|
@ -843,7 +843,7 @@ pub fn is_zero(n: &u8) -> bool {
|
||||
*n == 0
|
||||
}
|
||||
|
||||
fn vec_first_element<T, S>(vec: &Vec<T>, serializer: S) -> StdResult<S::Ok, S::Error>
|
||||
fn vec_first_element<T, S>(vec: &[T], serializer: S) -> StdResult<S::Ok, S::Error>
|
||||
where
|
||||
T: Serialize,
|
||||
S: Serializer,
|
||||
|
Loading…
Reference in New Issue
Block a user