Skip to content

Commit

Permalink
fix(gns): init error is cstr
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Oct 25, 2024
1 parent 4349fff commit 08d984d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl GnsGlobal {
GNS_INIT.store(false, std::sync::atomic::Ordering::SeqCst);
Err(format!(
"{}",
core::str::from_utf8_unchecked(core::mem::transmute(&error[..]))
CStr::from_ptr(error.as_ptr()).to_string_lossy()
))
} else {
Ok(GnsGlobal(()))
Expand Down

0 comments on commit 08d984d

Please sign in to comment.