xml: Make XmlSerialize trait more precise

This commit is contained in:
Lennart K
2025-07-02 12:51:29 +02:00
parent ee1faa4c20
commit bf13d95b97
4 changed files with 1 additions and 6 deletions

View File

@@ -35,7 +35,6 @@ impl XmlSerialize for UserPrivilegeSet {
.serialize(ns, tag, namespaces, writer)
}
#[allow(refining_impl_trait)]
fn attributes<'a>(&self) -> Option<Vec<quick_xml::events::attributes::Attribute<'a>>> {
None
}

View File

@@ -57,7 +57,6 @@ impl XmlSerialize for TagList {
Ok(())
}
#[allow(refining_impl_trait)]
fn attributes<'a>(&self) -> Option<Vec<quick_xml::events::attributes::Attribute<'a>>> {
None
}

View File

@@ -15,7 +15,7 @@ pub trait XmlSerialize {
writer: &mut quick_xml::Writer<W>,
) -> std::io::Result<()>;
fn attributes<'a>(&self) -> Option<impl IntoIterator<Item: Into<Attribute<'a>>>>;
fn attributes<'a>(&self) -> Option<Vec<Attribute<'a>>>;
}
impl<T: XmlSerialize> XmlSerialize for Option<T> {
@@ -33,7 +33,6 @@ impl<T: XmlSerialize> XmlSerialize for Option<T> {
}
}
#[allow(refining_impl_trait)]
fn attributes<'a>(&self) -> Option<Vec<Attribute<'a>>> {
None
}
@@ -96,7 +95,6 @@ impl XmlSerialize for () {
Ok(())
}
#[allow(refining_impl_trait)]
fn attributes<'a>(&self) -> Option<Vec<quick_xml::events::attributes::Attribute<'a>>> {
None
}

View File

@@ -140,7 +140,6 @@ impl<T: ValueSerialize> XmlSerialize for T {
Ok(())
}
#[allow(refining_impl_trait)]
fn attributes<'a>(&self) -> Option<Vec<quick_xml::events::attributes::Attribute<'a>>> {
None
}