mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-07 07:38:59 +00:00
sys: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
8f769a3996
commit
b1a5daef61
@ -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);
|
nix::ioctl_write_ptr!(fs_ioc_fssetxattr, b'X', 32, FSXAttr);
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
/// Rust bindings for struct fsxattr (fsgetxattr, fssetxattr)
|
/// Rust bindings for struct fsxattr (fsgetxattr, fssetxattr)
|
||||||
pub struct FSXAttr {
|
pub struct FSXAttr {
|
||||||
pub fsx_xflags: u32,
|
pub fsx_xflags: u32,
|
||||||
@ -25,16 +25,3 @@ pub struct FSXAttr {
|
|||||||
pub fsx_cowextsize: u32,
|
pub fsx_cowextsize: u32,
|
||||||
pub fsx_pad: [u8; 8],
|
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],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -34,23 +34,23 @@ pub trait WorkerTaskContext: Send + Sync {
|
|||||||
/// Convenience implementation:
|
/// Convenience implementation:
|
||||||
impl<T: WorkerTaskContext + ?Sized> WorkerTaskContext for std::sync::Arc<T> {
|
impl<T: WorkerTaskContext + ?Sized> WorkerTaskContext for std::sync::Arc<T> {
|
||||||
fn abort_requested(&self) -> bool {
|
fn abort_requested(&self) -> bool {
|
||||||
<T as WorkerTaskContext>::abort_requested(&*self)
|
<T as WorkerTaskContext>::abort_requested(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_abort(&self) -> Result<(), Error> {
|
fn check_abort(&self) -> Result<(), Error> {
|
||||||
<T as WorkerTaskContext>::check_abort(&*self)
|
<T as WorkerTaskContext>::check_abort(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn shutdown_requested(&self) -> bool {
|
fn shutdown_requested(&self) -> bool {
|
||||||
<T as WorkerTaskContext>::shutdown_requested(&*self)
|
<T as WorkerTaskContext>::shutdown_requested(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fail_on_shutdown(&self) -> Result<(), Error> {
|
fn fail_on_shutdown(&self) -> Result<(), Error> {
|
||||||
<T as WorkerTaskContext>::fail_on_shutdown(&*self)
|
<T as WorkerTaskContext>::fail_on_shutdown(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn log(&self, level: log::Level, message: &std::fmt::Arguments) {
|
fn log(&self, level: log::Level, message: &std::fmt::Arguments) {
|
||||||
<T as WorkerTaskContext>::log(&*self, level, message)
|
<T as WorkerTaskContext>::log(self, level, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user