diff --git a/src/macros.rs b/src/macros.rs index c1bfc09..00447a9 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -29,7 +29,7 @@ pub mod pub_macros { impl FromStr for Type { type Err = String; fn from_str(s: &str) -> Result { - match s { + match s.to_ascii_uppercase().as_str() { $( $guid | stringify!($upcase) => Ok($upcase), diff --git a/src/partition_types.rs b/src/partition_types.rs index 05855c3..0c93c6b 100644 --- a/src/partition_types.rs +++ b/src/partition_types.rs @@ -352,6 +352,12 @@ mod tests { Type::from_str("00000000-0000-0000-0000-000000000000").unwrap(), UNUSED ); + + // test case sensitivity + assert_eq!( + Type::from_str("ebd0a0a2-b9e5-4433-87c0-68b6b72699c7").unwrap(), + BASIC + ); } #[test]