diff --git a/src/helpers.rs b/src/helpers.rs index 9cea2ef2..5a694381 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,8 +1,11 @@ use std::{ fs, + future::Future, io::{self, stderr, stdin, Write}, ops::{Deref, DerefMut}, path::{Path, PathBuf}, + pin::Pin, + task::{Context, Poll}, }; use bytes::Bytes; @@ -326,3 +329,11 @@ impl DerefMut for AutoAbortJoinHandle { &mut self.0 } } + +impl Future for AutoAbortJoinHandle { + type Output = Result; + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + Pin::new(&mut Pin::into_inner(self).0).poll(cx) + } +}