Skip to content

Commit 15acac7

Browse files
committed
fix: properly derive decode error instead of using u32 placeholder
1 parent b265bdc commit 15acac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raw_struct_derive/src/derive_raw_struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fn generate_reference_accessors(fields: &[(FieldArgs, Field)]) -> Result<TokenSt
183183
result.push(quote! {
184184
#(#attrs)*
185185
#[must_use]
186-
fn #name (&self) -> Result<#ty, raw_struct::MemoryDecodeError<#IDENT_MEMORY_VIEW_T::AccessError, <u32 as raw_struct::FromMemoryView>::DecodeError>> {
186+
fn #name (&self) -> Result<#ty, raw_struct::MemoryDecodeError<#IDENT_MEMORY_VIEW_T::AccessError, <#ty as raw_struct::FromMemoryView>::DecodeError>> {
187187
use raw_struct::{ ViewableImplementation, FromMemoryView };
188188

189189
let offset = (#offset) as u64;

0 commit comments

Comments
 (0)