diff --git a/src/daemon.rs b/src/daemon.rs index 5f1b88c..6ba89fb 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -20,7 +20,7 @@ use rustix::{ }; mod rustix { - pub use rustix::process::{getuid, pidfd_open, waitid}; + pub use rustix::process::waitid; pub use rustix::*; } @@ -87,42 +87,6 @@ fn next_token() -> Token { Token(tok) } -trait EventExt { - type Display; - - fn display(&self) -> Self::Display; -} - -#[derive(Copy)] -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] -struct EventDisplay { - token: Token, - error: bool, - writable: bool, - write_closed: bool, - readable: bool, - read_closed: bool, -} -impl EventExt for Event { - type Display = EventDisplay; - - fn display(&self) -> Self::Display { - EventDisplay { - token: self.token(), - error: self.is_error(), - writable: self.is_writable(), - write_closed: self.is_write_closed(), - readable: self.is_readable(), - read_closed: self.is_read_closed(), - } - } -} -impl Display for EventDisplay { - fn fmt(&self, f: &mut Formatter) -> FmtResult { - todo!() - } -} - #[derive(Debug)] pub struct Daemon { config_path: Arc,