diff --git a/proxmox-sys/src/fs/fsx_attr.rs b/proxmox-sys/src/fs/fsx_attr.rs index c0de02ce..6f3ec16f 100644 --- a/proxmox-sys/src/fs/fsx_attr.rs +++ b/proxmox-sys/src/fs/fsx_attr.rs @@ -15,7 +15,7 @@ nix::ioctl_read!(fs_ioc_fsgetxattr, b'X', 31, FSXAttr); nix::ioctl_write_ptr!(fs_ioc_fssetxattr, b'X', 32, FSXAttr); #[repr(C)] -#[derive(Debug)] +#[derive(Debug, Default)] /// Rust bindings for struct fsxattr (fsgetxattr, fssetxattr) pub struct FSXAttr { pub fsx_xflags: u32, @@ -25,16 +25,3 @@ pub struct FSXAttr { pub fsx_cowextsize: u32, pub fsx_pad: [u8; 8], } - -impl Default for FSXAttr { - fn default() -> Self { - FSXAttr { - fsx_xflags: 0u32, - fsx_extsize: 0u32, - fsx_nextents: 0u32, - fsx_projid: 0u32, - fsx_cowextsize: 0u32, - fsx_pad: [0u8; 8], - } - } -} diff --git a/proxmox-sys/src/worker_task_context.rs b/proxmox-sys/src/worker_task_context.rs index 89d57560..2c86857c 100644 --- a/proxmox-sys/src/worker_task_context.rs +++ b/proxmox-sys/src/worker_task_context.rs @@ -34,23 +34,23 @@ pub trait WorkerTaskContext: Send + Sync { /// Convenience implementation: impl WorkerTaskContext for std::sync::Arc { fn abort_requested(&self) -> bool { - ::abort_requested(&*self) + ::abort_requested(self) } fn check_abort(&self) -> Result<(), Error> { - ::check_abort(&*self) + ::check_abort(self) } fn shutdown_requested(&self) -> bool { - ::shutdown_requested(&*self) + ::shutdown_requested(self) } fn fail_on_shutdown(&self) -> Result<(), Error> { - ::fail_on_shutdown(&*self) + ::fail_on_shutdown(self) } fn log(&self, level: log::Level, message: &std::fmt::Arguments) { - ::log(&*self, level, message) + ::log(self, level, message) } }