Delete Decoder::read_struct_field

This commit is contained in:
Mark Rousskov 2022-02-09 17:26:17 -05:00
parent c021ba48a7
commit 19288951e1
5 changed files with 31 additions and 60 deletions

View file

@ -299,10 +299,7 @@ impl<E: Encoder> Encodable<E> for DefId {
impl<D: Decoder> Decodable<D> for DefId {
default fn decode(d: &mut D) -> DefId {
DefId {
krate: d.read_struct_field("krate", Decodable::decode),
index: d.read_struct_field("index", Decodable::decode),
}
DefId { krate: Decodable::decode(d), index: Decodable::decode(d) }
}
}