diff --git a/xso/src/from_xml_doc.md b/xso/src/from_xml_doc.md index f9085ced..d318ffc9 100644 --- a/xso/src/from_xml_doc.md +++ b/xso/src/from_xml_doc.md @@ -180,7 +180,7 @@ The `attribute` meta also supports a shorthand syntax, otherwise). If `default` is specified and the attribute is absent in the source, the value -is generated using [`std::default::Default`], requiring the field type to +is generated using [`core::default::Default`], requiring the field type to implement the `Default` trait for a `FromXml` derivation. `default` has no influence on `AsXml`. @@ -239,14 +239,14 @@ the field's type must implement [`FromXml`] in order to derive `FromXml` and [`AsXml`] in order to derive `AsXml`. When parsing a collection (with `n = ..`), the field's type must implement -[`IntoIterator`][`std::iter::IntoIterator`], where `T` must +[`IntoIterator`][`core::iter::IntoIterator`], where `T` must implement [`FromXml`] in order to derive `FromXml` and [`AsXml`] in order to derive `AsXml`. In addition, the field's type must implement -[`Extend`][`std::iter::Extend`] to derive `FromXml` and the field's +[`Extend`][`core::iter::Extend`] to derive `FromXml` and the field's reference type must implement `IntoIterator` to derive `AsXml`. If `default` is specified and the child is absent in the source, the value -is generated using [`std::default::Default`], requiring the field type to +is generated using [`core::default::Default`], requiring the field type to implement the `Default` trait for a `FromXml` derivation. `default` has no influence on `AsXml`. Combining `default` and `n` where `n` is not set to `1` is not supported and will cause a compile-time error. diff --git a/xso/src/lib.rs b/xso/src/lib.rs index 5db231f7..1a3f3eb8 100644 --- a/xso/src/lib.rs +++ b/xso/src/lib.rs @@ -233,7 +233,7 @@ impl FromXml for Box { /// Trait allowing to convert XML text to a value. /// -/// This trait is similar to [`std::str::FromStr`], however, due to +/// This trait is similar to [`core::str::FromStr`], however, due to /// restrictions imposed by the orphan rule, a separate trait is needed. /// Implementations for many standard library types are available. In /// addition, the following feature flags can enable more implementations: @@ -281,7 +281,7 @@ impl FromXmlText for Box { /// Trait to convert a value to an XML text string. /// /// This trait is implemented for many standard library types implementing -/// [`std::fmt::Display`]. In addition, the following feature flags can enable +/// [`core::fmt::Display`]. In addition, the following feature flags can enable /// more implementations: /// /// - `jid`: `jid::Jid`, `jid::BareJid`, `jid::FullJid` diff --git a/xso/src/minidom_compat.rs b/xso/src/minidom_compat.rs index b7f74ce4..6f491606 100644 --- a/xso/src/minidom_compat.rs +++ b/xso/src/minidom_compat.rs @@ -5,8 +5,8 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +use core::marker::PhantomData; use std::borrow::Cow; -use std::marker::PhantomData; use std::vec::IntoIter; use minidom::{Element, Node}; diff --git a/xso/src/rxml_util.rs b/xso/src/rxml_util.rs index 5b2a54fd..50750ee3 100644 --- a/xso/src/rxml_util.rs +++ b/xso/src/rxml_util.rs @@ -281,8 +281,6 @@ impl<'x, I: Iterator, crate::error::Error>>> Iterator for #[cfg(all(test, feature = "minidom"))] mod tests_minidom { - use std::convert::TryInto; - use super::*; fn events_to_items>(events: I) -> Vec> { @@ -423,8 +421,6 @@ mod tests_minidom { #[cfg(test)] mod tests { - use std::convert::TryInto; - use super::*; fn items_to_events<'x, I: IntoIterator>>( diff --git a/xso/src/text.rs b/xso/src/text.rs index 0f4e90c0..ba808d98 100644 --- a/xso/src/text.rs +++ b/xso/src/text.rs @@ -91,24 +91,24 @@ convert_via_fromstr_and_display! { f32, f64, char, - std::net::IpAddr, - std::net::Ipv4Addr, - std::net::Ipv6Addr, - std::net::SocketAddr, - std::net::SocketAddrV4, - std::net::SocketAddrV6, - std::num::NonZeroU8, - std::num::NonZeroU16, - std::num::NonZeroU32, - std::num::NonZeroU64, - std::num::NonZeroU128, - std::num::NonZeroUsize, - std::num::NonZeroI8, - std::num::NonZeroI16, - std::num::NonZeroI32, - std::num::NonZeroI64, - std::num::NonZeroI128, - std::num::NonZeroIsize, + core::net::IpAddr, + core::net::Ipv4Addr, + core::net::Ipv6Addr, + core::net::SocketAddr, + core::net::SocketAddrV4, + core::net::SocketAddrV6, + core::num::NonZeroU8, + core::num::NonZeroU16, + core::num::NonZeroU32, + core::num::NonZeroU64, + core::num::NonZeroU128, + core::num::NonZeroUsize, + core::num::NonZeroI8, + core::num::NonZeroI16, + core::num::NonZeroI32, + core::num::NonZeroI64, + core::num::NonZeroI128, + core::num::NonZeroIsize, #[cfg(feature = "uuid")] uuid::Uuid,