diff --git a/oqs/src/sig.rs b/oqs/src/sig.rs index 1fb15076d5..662e71d04e 100644 --- a/oqs/src/sig.rs +++ b/oqs/src/sig.rs @@ -4,7 +4,7 @@ //! for the list of supported algorithms. use alloc::vec::Vec; -use core::ptr::{NonNull, null}; +use core::ptr::{null, NonNull}; #[cfg(not(feature = "std"))] use cstr_core::CStr; @@ -428,7 +428,11 @@ impl Sig { // For algorithms without context string support, liboqs // expects the context to be NULL. Converting an empty // slice to a pointer doesn't actually do this. - let ctx_str_ptr = if ctx_str.len() != 0 { ctx_str.as_ptr() } else { null() }; + let ctx_str_ptr = if ctx_str.len() != 0 { + ctx_str.as_ptr() + } else { + null() + }; let status = unsafe { func( sig.bytes.as_mut_ptr(), @@ -496,7 +500,11 @@ impl Sig { // For algorithms without context string support, liboqs // expects the context to be NULL. Converting an empty // slice to a pointer doesn't actually do this. - let ctx_str_ptr = if ctx_str.len() != 0 { ctx_str.as_ptr() } else { null() }; + let ctx_str_ptr = if ctx_str.len() != 0 { + ctx_str.as_ptr() + } else { + null() + }; let status = unsafe { func( message.as_ptr(),