xso-proc: deduplicate parsing of namespace / name keys

This commit is contained in:
Jonas Schäfer 2024-08-01 16:39:02 +02:00
commit e0de035448
4 changed files with 88 additions and 76 deletions

View file

@ -12,7 +12,7 @@ use syn::*;
use crate::common::{AsXmlParts, FromXmlParts, ItemDef};
use crate::compound::Compound;
use crate::meta::{reject_key, Flag, NameRef, NamespaceRef, XmlCompoundMeta};
use crate::meta::{reject_key, Flag, NameRef, NamespaceRef, QNameRef, XmlCompoundMeta};
/// Definition of a struct and how to parse it.
pub(crate) struct StructDef {
@ -46,8 +46,7 @@ impl StructDef {
// an error if they are present.
let XmlCompoundMeta {
span: meta_span,
namespace,
name,
qname: QNameRef { namespace, name },
exhaustive,
debug,
builder,