Skip to content

Commit 14d4d8e

Browse files
committed
Bump dev-dependencies
Only minor adaptions are required to use the latest `rand` and `nix` releases.
1 parent e6d9b22 commit 14d4d8e

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ bitflags = "1.0"
3535

3636
[dev-dependencies]
3737
env_logger = "0.6"
38-
quickcheck = "0.8"
39-
rand = "0.6"
38+
quickcheck = "0.9"
39+
rand = "0.7"
4040
tempfile = "3"
4141
timebomb = "0.1.2"
42-
nix = "0.13"
42+
nix = "0.15"
4343
compiletest_rs = { version = "0.3.10", features = ["stable"] }
4444

4545
[[example]]

examples/zguide/weather_server/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
//! Binds PUB socket to tcp://*:5556 and ipc://weather.ipc
55
//! Publishes random weather updates
66
7-
use rand::rngs::SmallRng;
8-
use rand::FromEntropy;
97
use rand::Rng;
108

119
fn main() {
@@ -15,7 +13,7 @@ fn main() {
1513
assert!(publisher.bind("tcp://*:5556").is_ok());
1614
assert!(publisher.bind("ipc://weather.ipc").is_ok());
1715

18-
let mut rng = SmallRng::from_entropy();
16+
let mut rng = rand::thread_rng();
1917

2018
loop {
2119
let zipcode = rng.gen_range(0, 100_000);

tests/unix/connection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// the basis for integration with external event loops works.
66

77
use log::debug;
8-
use nix::poll;
8+
use nix::poll::{self, PollFlags};
99

1010
use super::with_connection;
1111

@@ -64,7 +64,7 @@ impl<'a> PollState<'a> {
6464
let fd = socket.get_fd().unwrap();
6565
PollState {
6666
socket,
67-
fds: [poll::PollFd::new(fd, poll::EventFlags::POLLIN)],
67+
fds: [poll::PollFd::new(fd, PollFlags::POLLIN)],
6868
}
6969
}
7070

@@ -77,7 +77,7 @@ impl<'a> PollState<'a> {
7777
debug!("poll done, events: {:?}", fds[0].revents());
7878
match fds[0].revents() {
7979
Some(events) => {
80-
if !events.contains(poll::EventFlags::POLLIN) {
80+
if !events.contains(PollFlags::POLLIN) {
8181
continue;
8282
}
8383
}

0 commit comments

Comments
 (0)