We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9aa8ad commit 1ce58eaCopy full SHA for 1ce58ea
tests/custom.rs
@@ -16,6 +16,9 @@ fn len7_err() -> Error {
16
}
17
18
fn super_insecure_rng(buf: &mut [u8]) -> Result<(), Error> {
19
+ // `getrandom` guarantees it will not call any implementation if the output
20
+ // buffer is empty.
21
+ assert!(!buf.is_empty());
22
// Length 7 buffers return a custom error
23
if buf.len() == 7 {
24
return Err(len7_err());
0 commit comments