From 25fd3a73fe9486bee8c6a7dea174e9068ba8f56f Mon Sep 17 00:00:00 2001 From: lifegpc Date: Fri, 10 Jun 2022 10:31:28 +0000 Subject: [PATCH] Add missing #[inline] --- proc_macros/proc_macros.rs | 2 ++ 1 file changed, 2 insertions(+) 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()) }