Skip to content

Commit f3fd1e9

Browse files
committed
refactor
1 parent f84a2ae commit f3fd1e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rust/diffie-hellman/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ use rand::Rng;
33

44
pub fn private_key(p: u64) -> u64 {
55
let mut rng = rand::thread_rng();
6-
let result = rng.gen_range(2..p);
7-
return result;
6+
rng.gen_range(2..p)
87
}
98

109
pub fn public_key(p: u64, g: u64, a: u64) -> u64 {

0 commit comments

Comments
 (0)