Remove manual doc_cfg feature because we have doc_auto_cfg

This commit is contained in:
xmppftw xmppftw 2024-08-04 22:52:28 +02:00
commit 2103ef0191
10 changed files with 1 additions and 28 deletions

View file

@ -1,5 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![forbid(unsafe_code)]
#![warn(missing_docs)]
/*!
@ -23,7 +23,6 @@ use of this library in parsing XML streams like specified in RFC 6120.
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
pub mod error;
#[cfg(feature = "minidom")]
#[cfg_attr(docsrs, doc(cfg(feature = "minidom")))]
pub mod minidom_compat;
mod rxml_util;
pub mod text;
@ -46,7 +45,6 @@ pub use rxml_util::Item;
#[doc = include_str!("from_xml_doc.md")]
#[doc(inline)]
#[cfg(feature = "macros")]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
pub use xso_proc::FromXml;
/// # Make a struct or enum serialisable to XML
@ -58,7 +56,6 @@ pub use xso_proc::FromXml;
/// documented on [`macro@FromXml`].
#[doc(inline)]
#[cfg(feature = "macros")]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
pub use xso_proc::AsXml;
/// Trait allowing to iterate a struct's contents as serialisable
@ -419,7 +416,6 @@ pub fn transform<T: FromXml, F: AsXml>(from: F) -> Result<T, self::error::Error>
/// function will return the element unharmed if its element header does not
/// match the expectations of `T`.
#[cfg(feature = "minidom")]
#[cfg_attr(docsrs, doc(cfg(feature = "minidom")))]
pub fn try_from_element<T: FromXml>(
from: minidom::Element,
) -> Result<T, self::error::FromElementError> {

View file

@ -20,7 +20,6 @@ macro_rules! convert_via_fromstr_and_display {
$(
$(
#[cfg $cfg]
#[cfg_attr(docsrs, doc(cfg $cfg))]
)?
impl FromXmlText for $t {
#[doc = concat!("Parse [`", stringify!($t), "`] from XML text via [`FromStr`][`core::str::FromStr`].")]
@ -31,7 +30,6 @@ macro_rules! convert_via_fromstr_and_display {
$(
#[cfg $cfg]
#[cfg_attr(docsrs, doc(cfg $cfg))]
)?
impl AsXmlText for $t {
#[doc = concat!("Convert [`", stringify!($t), "`] to XML text via [`Display`][`core::fmt::Display`].\n\nThis implementation never fails.")]
@ -288,11 +286,9 @@ impl TextFilter for StripWhitespace {
/// of incoming text data. Most interestingly, passing [`StripWhitespace`]
/// will make the implementation ignore any whitespace within the text.
#[cfg(feature = "base64")]
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
pub struct Base64;
#[cfg(feature = "base64")]
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
impl TextCodec<Vec<u8>> for Base64 {
fn decode(&self, s: String) -> Result<Vec<u8>, Error> {
StandardBase64Engine
@ -306,7 +302,6 @@ impl TextCodec<Vec<u8>> for Base64 {
}
#[cfg(feature = "base64")]
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
impl<'x> TextCodec<Cow<'x, [u8]>> for Base64 {
fn decode(&self, s: String) -> Result<Cow<'x, [u8]>, Error> {
StandardBase64Engine
@ -321,7 +316,6 @@ impl<'x> TextCodec<Cow<'x, [u8]>> for Base64 {
}
#[cfg(feature = "base64")]
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
impl<T> TextCodec<Option<T>> for Base64
where
Base64: TextCodec<T>,