1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Origin: backport, https://github.com/Keats/rust-bcrypt/pull/85
From: Bastian Germann <bage@debian.org>
Date: Thu, 27 Jun 2024 13:06:33 +0200
Subject: Allow testing with no features
---
diff --git a/src/lib.rs b/src/lib.rs
index c42f77a..1b4e70e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -219,7 +219,7 @@ pub fn verify<P: AsRef<[u8]>>(password: P, hash: &str) -> BcryptResult<bool> {
Ok(source_decoded.ct_eq(&generated_decoded).into())
}
-#[cfg(test)]
+#[cfg(all(test, any(feature = "alloc", feature = "std")))]
mod tests {
use super::{
_hash_password,
|