Skip to content

Commit 1f6a301

Browse files
committed
use hint::black_box
1 parent a49cf7c commit 1f6a301

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

zeroize/tests/alloc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ impl<S: Zeroize> Drop for SecretBox<S> {
4343

4444
#[test]
4545
fn proxy_alloc_test() {
46-
let _b1 = SecretBox::new([u128::MAX; 10]);
47-
let _b2 = SecretBox::new([u8::MAX; 160]);
46+
let b1 = SecretBox::new([u128::MAX; 10]);
47+
core::hint::black_box(&b1);
48+
let b2 = SecretBox::new([u8::MAX; 160]);
49+
core::hint::black_box(&b2);
4850
}

0 commit comments

Comments
 (0)