diff --git a/ctru-rs/src/services/ac.rs b/ctru-rs/src/services/ac.rs index e2a08a5..74fd8ee 100644 --- a/ctru-rs/src/services/ac.rs +++ b/ctru-rs/src/services/ac.rs @@ -32,15 +32,17 @@ impl Ac { #[doc(alias = "acInit")] pub fn new() -> crate::Result { Ok(Ac { - _service_handler: ServiceReference::new(&AC_ACTIVE, + _service_handler: ServiceReference::new( + &AC_ACTIVE, || { ResultCode(unsafe { ctru_sys::acInit() })?; - + Ok(()) }, || unsafe { ctru_sys::acExit(); - },)? + }, + )?, }) }