Skip to content

Commit

Permalink
Fix warnings on stable Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
unexge authored and cberner committed Nov 12, 2024
1 parent 9f6ced7 commit e18bd9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/ll/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ mod request;
use std::{convert::TryInto, num::NonZeroI32, time::SystemTime};

pub use reply::Response;
pub use request::{
AnyRequest, FileHandle, INodeNo, Lock, Operation, Request, RequestError, RequestId, Version,
};
pub use request::{AnyRequest, FileHandle, INodeNo, Lock, Operation, Request, RequestId, Version};

#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
/// Possible input arguments for atime & mtime, which can either be set to a specified time,
Expand Down
2 changes: 2 additions & 0 deletions src/ll/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub(crate) enum Notification<'a> {
Bare(NotificationBuf),

/// For notifications that include a buffer of arbitrary data
#[allow(dead_code)]
WithData(NotificationBuf, &'a [u8]),

/// For notifications that include a NUL-terminated name
Expand Down Expand Up @@ -122,6 +123,7 @@ impl<'a> Notification<'a> {
Self::WithName(buf.as_bytes().into(), name)
}

#[allow(dead_code)]
fn from_struct_with_data<T: IntoBytes + Immutable + ?Sized>(buf: &T, data: &'a [u8]) -> Self {
Self::WithData(buf.as_bytes().into(), data)
}
Expand Down
6 changes: 6 additions & 0 deletions src/ll/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ mod op {
GetSize(GetXAttrSize),
/// User is requesting the data stored in the XAttr. If the data will fit
/// in this number of bytes it should be returned, otherwise return [Err(Errno::ERANGE)].
#[allow(dead_code)]
Size(NonZeroU32),
}
impl<'a> GetXAttr<'a> {
Expand Down Expand Up @@ -1517,6 +1518,7 @@ mod op {
}

/// Copy the specified range from the source inode to the destination inode
#[cfg(feature = "abi-7-28")]
#[derive(Debug, Clone, Copy)]
pub struct CopyFileRangeFile {
pub inode: INodeNo,
Expand Down Expand Up @@ -1885,6 +1887,7 @@ pub enum Operation<'a> {
Forget(Forget<'a>),
GetAttr(GetAttr<'a>),
SetAttr(SetAttr<'a>),
#[allow(dead_code)]
ReadLink(ReadLink<'a>),
SymLink(SymLink<'a>),
MkNod(MkNod<'a>),
Expand All @@ -1896,6 +1899,7 @@ pub enum Operation<'a> {
Open(Open<'a>),
Read(Read<'a>),
Write(Write<'a>),
#[allow(dead_code)]
StatFs(StatFs<'a>),
Release(Release<'a>),
FSync(FSync<'a>),
Expand All @@ -1922,6 +1926,7 @@ pub enum Operation<'a> {
#[cfg(feature = "abi-7-11")]
Poll(Poll<'a>),
#[cfg(feature = "abi-7-15")]
#[allow(dead_code)]
NotifyReply(NotifyReply<'a>),
#[cfg(feature = "abi-7-16")]
BatchForget(BatchForget<'a>),
Expand All @@ -1944,6 +1949,7 @@ pub enum Operation<'a> {
Exchange(Exchange<'a>),

#[cfg(feature = "abi-7-12")]
#[allow(dead_code)]
CuseInit(CuseInit<'a>),
}

Expand Down

0 comments on commit e18bd9b

Please sign in to comment.