Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Aug 6, 2024
1 parent 53ff944 commit a8b8db3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/libs/core/src/guid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ impl core::fmt::Debug for GUID {

impl TryFrom<&str> for GUID {
type Error = Error;

fn try_from(from: &str) -> Result<Self> {
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)?;
Expand Down

0 comments on commit a8b8db3

Please sign in to comment.