We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def3a53 commit 94ae18aCopy full SHA for 94ae18a
framework_lib/src/esrt/mod.rs
@@ -50,6 +50,7 @@ use std::path::Path;
50
/// assert_eq!(guid, None);
51
/// ```
52
pub fn guid_from_str(string: &str) -> Option<Guid> {
53
+ let string = string.strip_suffix('\n').unwrap_or(string);
54
let sections: Vec<&str> = string.split('-').collect();
55
let time_low = u32::from_str_radix(sections[0], 16).ok()?;
56
let time_mid = u16::from_str_radix(sections[1], 16).ok()?;
0 commit comments