Simplify some of the rendering code in the index

It's kinda silly using serde seq for fixed-length stuff.
This commit is contained in:
Michael Howell 2021-03-09 19:16:32 -07:00
parent e40b3d6a38
commit 66b65043df

View File

@ -286,11 +286,7 @@ impl Serialize for TypeWithKind {
where
S: Serializer,
{
let mut seq = serializer.serialize_seq(None)?;
seq.serialize_element(&self.ty.name)?;
let x: ItemType = self.kind.into();
seq.serialize_element(&x)?;
seq.end()
(&self.ty.name, ItemType::from(self.kind)).serialize(serializer)
}
}