diff --git a/crates/libs/core/src/guid.rs b/crates/libs/core/src/guid.rs index 442d2d1252..b47a9b5f7e 100644 --- a/crates/libs/core/src/guid.rs +++ b/crates/libs/core/src/guid.rs @@ -122,14 +122,15 @@ impl core::fmt::Debug for GUID { impl TryFrom<&str> for GUID { type Error = Error; + fn try_from(from: &str) -> Result { if from.len() != 36 { return Err(invalid_guid()); } let bytes = &mut from.bytes(); - let mut guid = Self::zeroed(); + guid.data1 = try_u32(bytes, true)?; guid.data2 = try_u16(bytes, true)?; guid.data3 = try_u16(bytes, true)?;