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 | |
parent | 6aef02cd7e182587a488c952f6b9771ce50a10ec (diff) |
Bump quickcheck to 0.9, rand to 0.7.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/Cargo.toml | 2 | ||||
-rw-r--r-- | ipc/src/lib.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ipc/Cargo.toml b/ipc/Cargo.toml index 6ac349ae..91634fc9 100644 --- a/ipc/Cargo.toml +++ b/ipc/Cargo.toml @@ -31,7 +31,7 @@ futures = "0.1" lalrpop-util = "0.17" libc = "0.2.33" memsec = "0.5.6" -rand = { version = "0.6", default-features = false } +rand = { version = "0.7", default-features = false } tempfile = "3.0" tokio = "0.1" tokio-core = "0.1" 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)) } |