summaryrefslogtreecommitdiffstats
path: root/tokio-fs/src/remove_dir.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-fs/src/remove_dir.rs')
-rw-r--r--tokio-fs/src/remove_dir.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/tokio-fs/src/remove_dir.rs b/tokio-fs/src/remove_dir.rs
index 74acffe3..b0de35e1 100644
--- a/tokio-fs/src/remove_dir.rs
+++ b/tokio-fs/src/remove_dir.rs
@@ -1,7 +1,10 @@
-use futures::{Future, Poll};
use std::fs;
+use std::future::Future;
use std::io;
use std::path::Path;
+use std::pin::Pin;
+use std::task::Context;
+use std::task::Poll;
/// Removes an existing, empty directory.
///
@@ -34,10 +37,9 @@ impl<P> Future for RemoveDirFuture<P>
where
P: AsRef<Path>,
{
- type Item = ();
- type Error = io::Error;
+ type Output = io::Result<()>;
- fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
+ fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Self::Output> {
crate::blocking_io(|| fs::remove_dir(&self.path))
}
}