Skip to content

Commit de48a23

Browse files
committed
Fixed examples
1 parent a7d2512 commit de48a23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/examples/basic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ use tokio_core::reactor::Core;
1414

1515
fn main() {
1616
let mut core = Core::new().unwrap();
17+
let handle = core.handle();
1718

1819
let host = Local::new().and_then(|host| {
1920
Command::new(&host, "whoami", None).and_then(|mut cmd| {
20-
cmd.exec().map(|out| {
21+
cmd.exec(&handle).map(|out| {
2122
println!("I'm currently running as {}", String::from_utf8_lossy(&out.stdout).trim());
2223
})
2324
})
2425
});
2526

2627
core.run(host).unwrap();
2728
}
29+

0 commit comments

Comments
 (0)