Remove dead code

This commit is contained in:
Johannes Altmanninger
2024-08-05 13:11:27 +02:00
parent 7cfc6297bc
commit 8fbe29ed7b

View File

@@ -44,37 +44,6 @@ pub fn from_md(buf: &Metadata) -> Self {
}
}
#[allow(clippy::unnecessary_cast)] // platform-dependent
pub fn from_stat(buf: &libc::stat) -> FileId {
let device = buf.st_dev as _;
let inode = buf.st_ino as _;
let size = buf.st_size as _;
let change_seconds = buf.st_ctime as _;
let mod_seconds = buf.st_mtime as _;
let change_nanoseconds;
let mod_nanoseconds;
#[cfg(not(target_os = "netbsd"))]
{
change_nanoseconds = buf.st_ctime_nsec as _;
mod_nanoseconds = buf.st_mtime_nsec as _;
}
#[cfg(target_os = "netbsd")]
{
change_nanoseconds = buf.st_ctimensec as _;
mod_nanoseconds = buf.st_mtimensec as _;
}
FileId {
dev_inode: DevInode { device, inode },
size,
change_seconds,
change_nanoseconds,
mod_seconds,
mod_nanoseconds,
}
}
/// Return true if \param rhs has higher mtime seconds than this file_id_t.
/// If identical, nanoseconds are compared.
pub fn older_than(&self, rhs: &FileId) -> bool {