diff --git a/xso-proc/src/compound.rs b/xso-proc/src/compound.rs index 128aa8c5..41c12fe9 100644 --- a/xso-proc/src/compound.rs +++ b/xso-proc/src/compound.rs @@ -97,7 +97,7 @@ impl Compound { for field in self.fields.iter() { let member = field.member(); let builder_field_name = mangle_member(member); - let part = field.make_builder_part(&scope, &output_name)?; + let part = field.make_builder_part(&scope, output_name)?; match part { FieldBuilderPart::Init { @@ -174,7 +174,7 @@ impl Compound { states.push(State::new_with_builder( default_state_ident.clone(), - &builder_data_ident, + builder_data_ident, &builder_data_ty, ).with_impl(quote! { match ev { diff --git a/xso-proc/src/error_message.rs b/xso-proc/src/error_message.rs index b2913b51..0c32db83 100644 --- a/xso-proc/src/error_message.rs +++ b/xso-proc/src/error_message.rs @@ -75,7 +75,7 @@ impl fmt::Display for FieldName<'_> { pub(super) fn on_missing_attribute(parent_name: &ParentRef, field: &Member) -> String { format!( "Required attribute {} on {} missing.", - FieldName(&field), + FieldName(field), parent_name ) } diff --git a/xso-proc/src/field.rs b/xso-proc/src/field.rs index e5026139..04a03586 100644 --- a/xso-proc/src/field.rs +++ b/xso-proc/src/field.rs @@ -350,9 +350,6 @@ impl FieldDef { /// Return true if this field's parsing consumes text data. pub(crate) fn is_text_field(&self) -> bool { - match self.kind { - FieldKind::Text { .. } => true, - _ => false, - } + matches!(self.kind, FieldKind::Text { .. }) } } diff --git a/xso-proc/src/meta.rs b/xso-proc/src/meta.rs index 2a880206..0b5fee4b 100644 --- a/xso-proc/src/meta.rs +++ b/xso-proc/src/meta.rs @@ -16,9 +16,9 @@ use syn::{meta::ParseNestedMeta, spanned::Spanned, *}; use rxml_validation::NcName; /// XML core namespace URI (for the `xml:` prefix) -pub const XMLNS_XML: &'static str = "http://www.w3.org/XML/1998/namespace"; +pub const XMLNS_XML: &str = "http://www.w3.org/XML/1998/namespace"; /// XML namespace URI (for the `xmlns:` prefix) -pub const XMLNS_XMLNS: &'static str = "http://www.w3.org/2000/xmlns/"; +pub const XMLNS_XMLNS: &str = "http://www.w3.org/2000/xmlns/"; /// Value for the `#[xml(namespace = ..)]` attribute. #[derive(Debug)] diff --git a/xso-proc/src/structs.rs b/xso-proc/src/structs.rs index 0de95ee7..5242cefb 100644 --- a/xso-proc/src/structs.rs +++ b/xso-proc/src/structs.rs @@ -118,7 +118,7 @@ impl StructDef { .compile() .render( vis, - &builder_ty_ident, + builder_ty_ident, &state_ty_ident, &TypePath { qself: None, @@ -165,7 +165,7 @@ impl StructDef { } .into(), &state_ty_ident, - &event_iter_ty_ident, + event_iter_ty_ident, )?; Ok(IntoXmlParts {