Delete Decoder::read_struct
This commit is contained in:
parent
a421b631ba
commit
c021ba48a7
5 changed files with 74 additions and 98 deletions
|
@ -299,10 +299,10 @@ impl<E: Encoder> Encodable<E> for DefId {
|
|||
|
||||
impl<D: Decoder> Decodable<D> for DefId {
|
||||
default fn decode(d: &mut D) -> DefId {
|
||||
d.read_struct(|d| DefId {
|
||||
DefId {
|
||||
krate: d.read_struct_field("krate", Decodable::decode),
|
||||
index: d.read_struct_field("index", Decodable::decode),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue