diff options
Diffstat (limited to 'src/devices/file/directory_child.rs')
-rw-r--r-- | src/devices/file/directory_child.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/devices/file/directory_child.rs b/src/devices/file/directory_child.rs deleted file mode 100644 index 376ec7d..0000000 --- a/src/devices/file/directory_child.rs +++ /dev/null @@ -1,35 +0,0 @@ -use super::*; - -use std::cmp::Ordering; - - -pub struct DirectoryChild { - pub path: BedrockFilePath, - pub entry_type: EntryType, -} - - -// --------------------------------------------------------------------------- - -impl PartialEq for DirectoryChild { - fn eq(&self, other: &Self) -> bool { - self.entry_type == other.entry_type && self.path == other.path - } -} - -impl Eq for DirectoryChild {} - -impl PartialOrd for DirectoryChild { - fn partial_cmp(&self, other: &Self) -> Option<Ordering> { - Some(self.cmp(other)) - } -} - -impl Ord for DirectoryChild { - fn cmp(&self, other: &Self) -> Ordering { - match self.entry_type.cmp(&other.entry_type) { - Ordering::Equal => self.path.cmp(&other.path), - ordering => ordering, - } - } -} |