diff --git a/proc_macros/proc_macros.rs b/proc_macros/proc_macros.rs index 4ae53ca..713ee25 100644 --- a/proc_macros/proc_macros.rs +++ b/proc_macros/proc_macros.rs @@ -68,9 +68,11 @@ pub fn impl_struct_writer_write(item: TokenStream) -> TokenStream { let befname = format!("write_be_{}", i); let befname = Ident::new(&befname, i.span()); let stream = quote! { + #[inline] fn #lefname(&mut self, data: #i) -> Result<(), Self::Error> { self.write_all(&data.to_le_bytes()) } + #[inline] fn #befname(&mut self, data: #i) -> Result<(), Self::Error> { self.write_all(&data.to_be_bytes()) }