From 6b795a7e49979dd59aae1b0ebb795ec844eec892 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Sun, 16 Jan 2022 16:18:06 -0500 Subject: [PATCH] Deduplicate random.randbytes random.randbytes() is now in random.py --- stdlib/src/random.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/stdlib/src/random.rs b/stdlib/src/random.rs index 5e74e4310..48d68deab 100644 --- a/stdlib/src/random.rs +++ b/stdlib/src/random.rs @@ -149,13 +149,5 @@ mod _random { }; Ok(BigInt::from_biguint(sign, uint)) } - - #[pymethod] - fn randbytes(&self, n: usize) -> PyResult> { - let mut buf = vec![0u8; n]; - let mut rng = self.rng.lock(); - rng.fill_bytes(&mut buf); - Ok(buf) - } } }