From a8b8db39ca23b11a660e47712095aa925e005654 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 6 Aug 2024 15:29:46 -0500 Subject: [PATCH] fmt --- crates/libs/core/src/guid.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)?;