]> git.proxmox.com Git - cargo.git/blobdiff - vendor/hex/src/error.rs
New upstream version 0.52.0
[cargo.git] / vendor / hex / src / error.rs
index b9f2acf650b25902ea42cd7c1405c5a107267616..ff7a3b5c16bd09bcc93724924d9b75a68722aa9c 100644 (file)
@@ -33,13 +33,17 @@ impl fmt::Display for FromHexError {
 }
 
 #[cfg(test)]
+// this feature flag is here to suppress unused
+// warnings of `super::*` and `pretty_assertions::assert_eq`
+#[cfg(feature = "alloc")]
 mod tests {
     use super::*;
-    #[cfg(not(feature = "std"))]
+    #[cfg(feature = "alloc")]
     use alloc::string::ToString;
     use pretty_assertions::assert_eq;
 
     #[test]
+    #[cfg(feature = "alloc")]
     fn test_display() {
         assert_eq!(
             FromHexError::InvalidHexCharacter { c: '\n', index: 5 }.to_string(),