Inline some encoding and decoding methods.
This is a small performance win.
This commit is contained in:
parent
5e7af4669f
commit
139c3cab28
@ -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…
x
Reference in New Issue
Block a user