Skip to content

Commit

Permalink
core
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 6, 2025
1 parent 32a90b2 commit 71d23e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/libs/core/src/guid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ impl GUID {
pub const fn from_u128(uuid: u128) -> Self {
Self {
data1: (uuid >> 96) as u32,
data2: (uuid >> 80 & 0xffff) as u16,
data3: (uuid >> 64 & 0xffff) as u16,
data2: ((uuid >> 80) & 0xffff) as u16,
data3: ((uuid >> 64) & 0xffff) as u16,
data4: (uuid as u64).to_be_bytes(),
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/libs/core/src/imp/sha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ impl ConstBuffer {
.push(b'-')
.push_hex_u16(guid.data3)
.push(b'-')
.push_hex_u16((guid.data4[0] as u16) << 8 | guid.data4[1] as u16)
.push_hex_u16(((guid.data4[0] as u16) << 8) | guid.data4[1] as u16)
.push(b'-')
.push_hex_u16((guid.data4[2] as u16) << 8 | guid.data4[3] as u16)
.push_hex_u16((guid.data4[4] as u16) << 8 | guid.data4[5] as u16)
.push_hex_u16((guid.data4[6] as u16) << 8 | guid.data4[7] as u16)
.push_hex_u16(((guid.data4[2] as u16) << 8) | guid.data4[3] as u16)
.push_hex_u16(((guid.data4[4] as u16) << 8) | guid.data4[5] as u16)
.push_hex_u16(((guid.data4[6] as u16) << 8) | guid.data4[7] as u16)
.push(b'}')
}
}
Expand Down

0 comments on commit 71d23e6

Please sign in to comment.