Fix types::System enum

Unix had incorrectly assigned the value 1 instead of 3
This commit is contained in:
Mathijs van de Nes 2016-10-29 12:30:30 +02:00
parent e747fcd779
commit 49e506c13c

View file

@ -2,12 +2,11 @@
use time;
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum System
{
Dos,
Unix,
Dos = 0,
Unix = 3,
Unknown,
#[doc(hidden)]
__Nonexhaustive,
@ -59,3 +58,15 @@ pub struct ZipFileData
/// External file attributes
pub external_attributes: u32,
}
#[cfg(test)]
mod test {
#[test]
fn system() {
use super::System;
assert_eq!(System::Dos as u16, 0u16);
assert_eq!(System::Unix as u16, 3u16);
assert_eq!(System::from_u8(0), System::Dos);
assert_eq!(System::from_u8(3), System::Unix);
}
}