1
Fork 0

Inline many methods of Encoder

They aren't overridden anyway
This commit is contained in:
bjorn3 2021-06-04 18:23:50 +02:00
parent 5cd29225a5
commit 22e8d5f80e
6 changed files with 250 additions and 384 deletions

View file

@ -307,11 +307,8 @@ impl DefId {
impl<E: Encoder> Encodable<E> for DefId {
default fn encode(&self, s: &mut E) -> Result<(), E::Error> {
s.emit_struct(|s| {
s.emit_struct_field(|s| self.krate.encode(s))?;
s.emit_struct_field(|s| self.index.encode(s))
})
self.krate.encode(s)?;
self.index.encode(s)
}
}