diff --git a/src/helpers.rs b/src/helpers.rs index 736cb74a..9cea2ef2 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,6 +1,7 @@ use std::{ fs, io::{self, stderr, stdin, Write}, + ops::{Deref, DerefMut}, path::{Path, PathBuf}, }; @@ -311,3 +312,17 @@ impl Drop for AutoAbortJoinHandle { self.0.abort(); } } + +impl Deref for AutoAbortJoinHandle { + type Target = task::JoinHandle; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl DerefMut for AutoAbortJoinHandle { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +}