mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
process: Update to 2018 edition
This commit is contained in:
parent
27c15471c1
commit
cb8607a816
@ -5,6 +5,7 @@ name = "tokio-process"
|
||||
# - Update CHANGELOG.md.
|
||||
# - Create "X.Y.Z" git tag.
|
||||
version = "0.2.4"
|
||||
edition = "2018"
|
||||
authors = ["Tokio Contributors <team@tokio.rs>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/tokio-rs/tokio"
|
||||
|
@ -172,9 +172,9 @@ extern crate log;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::process::{Command, ExitStatus, Output, Stdio};
|
||||
|
||||
use crate::kill::Kill;
|
||||
use futures::future::{ok, Either};
|
||||
use futures::{Async, Future, IntoFuture, Poll};
|
||||
use kill::Kill;
|
||||
use std::fmt;
|
||||
use tokio_io::io::read_to_end;
|
||||
use tokio_io::{AsyncRead, AsyncWrite, IoFuture};
|
||||
@ -759,8 +759,8 @@ mod sys {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::ChildDropGuard;
|
||||
use crate::kill::Kill;
|
||||
use futures::{Async, Future, Poll};
|
||||
use kill::Kill;
|
||||
use std::io;
|
||||
|
||||
struct Mock {
|
||||
|
@ -35,9 +35,9 @@ use self::orphan::{AtomicOrphanQueue, OrphanQueue, Wait};
|
||||
use self::reap::Reaper;
|
||||
use self::tokio_signal::unix::Signal;
|
||||
use super::SpawnedChild;
|
||||
use crate::kill::Kill;
|
||||
use futures::future::FlattenStream;
|
||||
use futures::{Future, Poll};
|
||||
use kill::Kill;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
@ -216,6 +216,6 @@ where
|
||||
return Err(io::Error::last_os_error());
|
||||
}
|
||||
}
|
||||
let io = try!(PollEvented::new_with_handle(Fd(io), handle));
|
||||
let io = PollEvented::new_with_handle(Fd(io), handle)?;
|
||||
Ok(Some(io))
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::orphan::{OrphanQueue, Wait};
|
||||
use crate::kill::Kill;
|
||||
use futures::{Async, Future, Poll, Stream};
|
||||
use kill::Kill;
|
||||
use std::io;
|
||||
use std::ops::Deref;
|
||||
use std::process::ExitStatus;
|
||||
|
@ -106,11 +106,11 @@ impl Future for Child {
|
||||
Async::Ready(()) => {}
|
||||
Async::NotReady => return Ok(Async::NotReady),
|
||||
}
|
||||
let status = try!(try_wait(&self.child)).expect("not ready yet");
|
||||
let status = try_wait(&self.child)?.expect("not ready yet");
|
||||
return Ok(status.into());
|
||||
}
|
||||
|
||||
if let Some(e) = try!(try_wait(&self.child)) {
|
||||
if let Some(e) = try_wait(&self.child)? {
|
||||
return Ok(e.into());
|
||||
}
|
||||
let (tx, rx) = oneshot::channel();
|
||||
@ -187,6 +187,6 @@ where
|
||||
None => return Ok(None),
|
||||
};
|
||||
let pipe = unsafe { NamedPipe::from_raw_handle(io.into_raw_handle()) };
|
||||
let io = try!(PollEvented::new_with_handle(pipe, handle));
|
||||
let io = PollEvented::new_with_handle(pipe, handle)?;
|
||||
Ok(Some(io))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user