Skip to content

Commit 728afdb

Browse files
committed
Fix type mismatches
1 parent f862ba3 commit 728afdb

File tree

1 file changed

+4
-4
lines changed
  • ctru-rs/src/services

1 file changed

+4
-4
lines changed

ctru-rs/src/services/ac.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl Ac {
134134
#[doc(alias = "ACU_GetWifiSecurityMode")]
135135
pub fn wifi_security(&self) -> crate::Result<SecurityMode> {
136136
unsafe {
137-
let mut ret = 0u32;
137+
let mut ret = 0u8;
138138
ResultCode(ctru_sys::ACU_GetSecurityMode(&mut ret))?;
139139
// fix this, for some reason the bindings have the type as a struct and not enum
140140
// and so i can't impl TryFrom automatically
@@ -238,9 +238,9 @@ impl Ac {
238238
/// # }
239239
/// ```
240240
#[doc(alias = "ACU_GetProxyPort")]
241-
pub fn proxy_port(&self) -> crate::Result<u32> {
241+
pub fn proxy_port(&self) -> crate::Result<u16> {
242242
unsafe {
243-
let mut ret = 0u32;
243+
let mut ret = 0u16;
244244
ResultCode(ctru_sys::ACU_GetProxyPort(&mut ret))?;
245245

246246
Ok(ret)
@@ -338,7 +338,7 @@ impl Ac {
338338

339339
#[doc(alias = "acSecurityMode")]
340340
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
341-
#[repr(u32)]
341+
#[repr(u8)]
342342
#[non_exhaustive]
343343
#[allow(non_camel_case_types)]
344344
/// Represents all the supported Wi-Fi security modes.

0 commit comments

Comments
 (0)