diff --git a/ctru-rs/src/error.rs b/ctru-rs/src/error.rs index 3231c4e..33eecf6 100644 --- a/ctru-rs/src/error.rs +++ b/ctru-rs/src/error.rs @@ -103,7 +103,11 @@ impl fmt::Debug for Error { Self::Libc(err) => f.debug_tuple("Libc").field(err).finish(), Self::ServiceAlreadyActive => f.debug_tuple("ServiceAlreadyActive").finish(), Self::OutputAlreadyRedirected => f.debug_tuple("OutputAlreadyRedirected").finish(), - Self::BufferTooShort(provided, wanted) => f.debug_tuple("BufferTooShort").field(provided).field(wanted).finish(), + Self::BufferTooShort(provided, wanted) => f + .debug_tuple("BufferTooShort") + .field(provided) + .field(wanted) + .finish(), } } } diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 4e222e0..26bbede 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -742,8 +742,8 @@ pub trait Camera { }; let screen_size: usize = usize::from(width) * usize::from(height) * 2; - if buffer.len() < screen_size as usize { - return Err(Error::BufferTooShort(buffer.len(), screen_size)) + if buffer.len() < screen_size { + return Err(Error::BufferTooShort(buffer.len(), screen_size)); } unsafe {