Skip to content

Commit

Permalink
Remove one unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
Riey committed Sep 18, 2024
1 parent b61c373 commit 23b9273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/erars-ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl StrKey {

#[inline]
pub fn to_u32(self) -> u32 {
unsafe { std::mem::transmute(self) }
self.0.into_inner().get()
}

pub fn resolve(self) -> &'static str {
Expand Down

0 comments on commit 23b9273

Please sign in to comment.