Auto merge of #69281 - nnethercote:inline-some-encoding-decoding-methods, r=Centril

Inline some encoding and decoding methods.

This is a small performance win.

r? @Centril
This commit is contained in:
bors 2020-02-21 03:14:55 +00:00
commit 2851e59a52
2 changed files with 2 additions and 0 deletions

View File

@ -301,6 +301,7 @@ where
macro_rules! __impl_decoder_methods {
($($name:ident -> $ty:ty;)*) => {
$(
#[inline]
fn $name(&mut self) -> Result<$ty, Self::Error> {
self.opaque.$name()
}

View File

@ -943,6 +943,7 @@ where
macro_rules! encoder_methods {
($($name:ident($ty:ty);)*) => {
#[inline]
$(fn $name(&mut self, value: $ty) -> Result<(), Self::Error> {
self.encoder.$name(value)
})*