From 20fd561482a592ab22c6954c1bdec00c8cb9fda5 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Wed, 26 Dec 2018 17:09:20 +0100 Subject: [PATCH] Support passing both borrowed and owned Rngs --- src/ristretto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ristretto.rs b/src/ristretto.rs index e6375ed..74adefd 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -621,7 +621,7 @@ impl RistrettoPoint { /// discrete log of the output point with respect to any other /// point should be unknown. The map is applied twice and the /// results are added, to ensure a uniform distribution. - pub fn random(rng: &mut T) -> Self { + pub fn random(mut rng: T) -> Self { let mut uniform_bytes = [0u8; 64]; rng.fill(&mut uniform_bytes);