forked from M-Labs/rust-fatfs
Add derived traits for FsStatusFlags and add Eq for some structs
This commit is contained in:
parent
85c48d6aec
commit
75a6c32360
@ -429,7 +429,7 @@ impl DirEntryData {
|
||||
}
|
||||
|
||||
/// DOS compatible date
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct Date {
|
||||
pub year: u16,
|
||||
pub month: u16,
|
||||
@ -449,7 +449,7 @@ impl Date {
|
||||
}
|
||||
|
||||
/// DOS compatible time
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct Time {
|
||||
pub hour: u16,
|
||||
pub min: u16,
|
||||
@ -468,7 +468,7 @@ impl Time {
|
||||
}
|
||||
|
||||
/// DOS compatible date and time
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct DateTime {
|
||||
pub date: Date,
|
||||
pub time: Time,
|
||||
|
@ -20,7 +20,7 @@ use core::str;
|
||||
// http://wiki.osdev.org/FAT
|
||||
// https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub enum FatType {
|
||||
Fat12, Fat16, Fat32,
|
||||
}
|
||||
@ -37,6 +37,7 @@ impl FatType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct FsStatusFlags {
|
||||
pub(crate) dirty: bool,
|
||||
pub(crate) io_error: bool,
|
||||
@ -215,7 +216,7 @@ impl Default for BootRecord {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
#[derive(Clone, Default, Debug)]
|
||||
struct FsInfoSector {
|
||||
free_cluster_count: Option<u32>,
|
||||
next_free_cluster: Option<u32>,
|
||||
@ -290,7 +291,7 @@ impl FsInfoSector {
|
||||
}
|
||||
|
||||
/// FAT filesystem options.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct FsOptions {
|
||||
pub(crate) update_accessed_date: bool,
|
||||
pub(crate) update_fs_info: bool,
|
||||
@ -318,7 +319,7 @@ impl FsOptions {
|
||||
}
|
||||
|
||||
/// FAT filesystem statistics
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct FileSystemStats {
|
||||
/// Cluster size in bytes
|
||||
cluster_size: u32,
|
||||
|
Loading…
Reference in New Issue
Block a user