jid: Remove the std feature
Since Rust 1.81, std::error::Error has been moved to core::error::Error, which we can use without depending on std.
This commit is contained in:
parent
dc842c44d1
commit
c390af2b36
3 changed files with 3 additions and 7 deletions
|
|
@ -32,6 +32,5 @@ serde_test = "1"
|
|||
jid = { path = ".", features = [ "serde" ] }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = []
|
||||
default = []
|
||||
quote = ["dep:quote", "dep:proc-macro2"]
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
extern crate alloc;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
#[cfg(test)]
|
||||
extern crate std;
|
||||
|
||||
use alloc::borrow::Cow;
|
||||
|
|
|
|||
Loading…
Reference in a new issue