File: no-features.patch

package info (click to toggle)
rust-bcrypt 0.15.1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 184 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (2)
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,