Skip to content

Commit

Permalink
Simplify some of the rendering code in the index
Browse files Browse the repository at this point in the history
It's kinda silly using serde seq for fixed-length stuff.
  • Loading branch information
notriddle committed Mar 10, 2021
1 parent e40b3d6 commit 66b6504
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 66b6504

Please sign in to comment.