From a2aab6a5770271ddfbac88e8e46343b42ceeba18 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Sat, 11 Feb 2023 17:14:23 +0100 Subject: [PATCH] Cargo fmt --- ctru-rs/src/linear.rs | 3 +-- ctru-rs/src/services/ps.rs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ctru-rs/src/linear.rs b/ctru-rs/src/linear.rs index 77cf526..c07ce49 100644 --- a/ctru-rs/src/linear.rs +++ b/ctru-rs/src/linear.rs @@ -29,8 +29,7 @@ impl LinearAllocator { unsafe impl Allocator for LinearAllocator { fn allocate(&self, layout: Layout) -> Result, AllocError> { - let pointer = - unsafe { ctru_sys::linearMemAlign(layout.size(), layout.align()) }; + let pointer = unsafe { ctru_sys::linearMemAlign(layout.size(), layout.align()) }; NonNull::new(pointer.cast()) .map(|ptr| NonNull::slice_from_raw_parts(ptr, layout.size())) diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index 6a449c4..d87cda4 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -45,9 +45,7 @@ pub fn device_id() -> crate::Result { } pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> { - ResultCode(unsafe { - ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len()) - })?; + ResultCode(unsafe { ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len()) })?; Ok(()) }