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:
commit
2851e59a52
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
})*
|
||||
|
|
Loading…
Reference in New Issue