diff --git a/jid/Cargo.toml b/jid/Cargo.toml index 3559d2cb..dcb93750 100644 --- a/jid/Cargo.toml +++ b/jid/Cargo.toml @@ -32,6 +32,5 @@ serde_test = "1" jid = { path = ".", features = [ "serde" ] } [features] -default = ["std"] -std = [] +default = [] quote = ["dep:quote", "dep:proc-macro2"] diff --git a/jid/src/error.rs b/jid/src/error.rs index a954931a..63a23ebb 100644 --- a/jid/src/error.rs +++ b/jid/src/error.rs @@ -9,8 +9,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use core::fmt; -#[cfg(feature = "std")] -use std::error::Error as StdError; /// An error that signifies that a `Jid` cannot be parsed from a string. #[derive(Debug, PartialEq, Eq)] @@ -50,8 +48,7 @@ pub enum Error { ResourceInBareJid, } -#[cfg(feature = "std")] -impl StdError for Error {} +impl core::error::Error for Error {} impl fmt::Display for Error { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { diff --git a/jid/src/lib.rs b/jid/src/lib.rs index b8b2c916..6128196d 100644 --- a/jid/src/lib.rs +++ b/jid/src/lib.rs @@ -34,7 +34,7 @@ extern crate alloc; -#[cfg(any(feature = "std", test))] +#[cfg(test)] extern crate std; use alloc::borrow::Cow;