diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-06 17:08:37 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-06 17:22:47 +0200 |
commit | e66d4d27079e45e7b39a9dc3b8bc97ea0428f014 (patch) | |
tree | 8eb04e19b658c8df4eebca21a511cf917df20fd4 /ipc/src/lib.rs | |
parent | 6aef02cd7e182587a488c952f6b9771ce50a10ec (diff) |
Bump quickcheck to 0.9, rand to 0.7.
Diffstat (limited to 'ipc/src/lib.rs')
-rw-r--r-- | ipc/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/src/lib.rs b/ipc/src/lib.rs index 25d28ef1..5633f3f8 100644 --- a/ipc/src/lib.rs +++ b/ipc/src/lib.rs @@ -235,7 +235,7 @@ impl Descriptor { /// Try to create a TCP socket, bind it to a random port on /// localhost. fn listen(&self) -> Result<TcpListener> { - let port = OsRng::new()?.next_u32() as u16; + let port = OsRng.next_u32() as u16; Ok(TcpListener::bind((LOCALHOST, port))?) } @@ -414,7 +414,7 @@ impl Cookie { /// Make a new cookie. fn new() -> Result<Self> { let mut c = vec![0; COOKIE_SIZE]; - OsRng::new()?.fill_bytes(&mut c); + OsRng.fill_bytes(&mut c); Ok(Cookie(c)) } |