diff --git a/psopacket/src/lib.rs b/psopacket/src/lib.rs index 4207dc6..49f2cd7 100644 --- a/psopacket/src/lib.rs +++ b/psopacket/src/lib.rs @@ -32,17 +32,17 @@ fn generate_struct_def(name: syn::Ident, attrs: &Vec) -> proc_macro2:: for attr in attrs { let element = match attr { AttrType::Value(ty, name, _) => { - quote!(#name: #ty) + quote!(pub #name: #ty) }, AttrType::Array(ty, name, len, _) => { - quote!(#name: [#ty; #len]) + quote!(pub #name: [#ty; #len]) } }; struct_def.push(element); } quote! { - struct #name { + pub struct #name { #(#struct_def),* } } @@ -78,7 +78,6 @@ fn generate_psopacket_impl(pkt_cmd: u16, name: syn::Ident, attrs: &Vec let mut tmp = Vec::new(); for _ in 0..flag { - //#name: <#ty as PSOPacketData>::from_bytes(&mut cur)?, tmp.push(<#vec_type as PSOPacketData>::from_bytes(&mut cur)?); } tmp