jid: Remove the std feature

Emmanuel Gil Peyrot created

Since Rust 1.81, std::error::Error has been moved to core::error::Error,
which we can use without depending on std.

Change summary

jid/Cargo.toml   | 3 +--
jid/src/error.rs | 5 +----
jid/src/lib.rs   | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)

Detailed changes

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"]

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 {

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;