mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 02:54:11 +08:00
Remove FileId::dump
Instead just derive Debug. No reason for this to be custom.
This commit is contained in:
parent
d2f7a3507b
commit
eeecd6517d
@ -508,7 +508,7 @@ pub fn fish_wcswidth(s: &wstr) -> libc::c_int {
|
||||
/// other things. While an inode / dev pair is sufficient to distinguish co-existing files, Linux
|
||||
/// seems to aggressively re-use inodes, so it cannot determine if a file has been deleted (ABA
|
||||
/// problem). Therefore we include richer information.
|
||||
#[derive(Clone, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
#[derive(Debug, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct FileId {
|
||||
pub device: libc::dev_t,
|
||||
pub inode: libc::ino_t,
|
||||
@ -553,18 +553,6 @@ impl FileId {
|
||||
let rhs = (rhs.mod_seconds, rhs.mod_nanoseconds);
|
||||
lhs.cmp(&rhs).is_lt()
|
||||
}
|
||||
|
||||
pub fn dump(&self) -> WString {
|
||||
let mut result = WString::new();
|
||||
result += &sprintf!(" device: %lld\n", self.device)[..];
|
||||
result += &sprintf!(" inode: %lld\n", self.inode)[..];
|
||||
result += &sprintf!(" size: %lld\n", self.size)[..];
|
||||
result += &sprintf!(" change: %lld\n", self.change_seconds)[..];
|
||||
result += &sprintf!("change_nano: %lld\n", self.change_nanoseconds)[..];
|
||||
result += &sprintf!(" mod: %lld\n", self.mod_seconds)[..];
|
||||
result += &sprintf!(" mod_nano: %lld", self.mod_nanoseconds)[..];
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
pub const INVALID_FILE_ID: FileId = FileId::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user