diff --git a/src/fs.rs b/src/fs.rs index ea3c39d..52d2ab1 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -38,8 +38,18 @@ impl FatType { } pub struct FsStatusFlags { - pub dirty: bool, - pub io_error: bool, + pub(crate) dirty: bool, + pub(crate) io_error: bool, +} + +impl FsStatusFlags { + pub fn dirty(&self) -> bool { + self.dirty + } + + pub fn io_error(&self) -> bool { + self.io_error + } } pub trait ReadSeek: Read + Seek {} diff --git a/tests/read.rs b/tests/read.rs index 7640aa8..4c04669 100644 --- a/tests/read.rs +++ b/tests/read.rs @@ -195,8 +195,8 @@ fn test_volume_metadata_fat32() { fn test_status_flags(fs: FileSystem) { let status_flags = fs.read_status_flags().unwrap(); - assert_eq!(status_flags.dirty, false); - assert_eq!(status_flags.io_error, false); + assert_eq!(status_flags.dirty(), false); + assert_eq!(status_flags.io_error(), false); } #[test]