diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index dc88bde..9a4a860 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -160,7 +160,7 @@ impl MiiSelectorReturn { impl From> for MiiSelectorReturn { fn from(ret: Box) -> Self { let checksum = ret.checksum; - let raw_mii_data = ret.mii._bindgen_opaque_blob.clone(); + let raw_mii_data = ret.mii._bindgen_opaque_blob; let no_mii_selected = ret.no_mii_selected; let guest_mii_index_clone = ret.guest_mii_index; let mut guest_mii_name = ret.guest_mii_name; diff --git a/ctru-rs/src/mii.rs b/ctru-rs/src/mii.rs index b211d76..f3b75ee 100644 --- a/ctru-rs/src/mii.rs +++ b/ctru-rs/src/mii.rs @@ -417,11 +417,11 @@ fn utf16_byte_pairs_to_string(data: &[u8]) -> String { .collect::>() .iter() .map(|v| { - u16::from_le_bytes([*v.get(0).unwrap_or(&0), *v.get(1).unwrap_or(&0)]) + u16::from_le_bytes([*v.first().unwrap_or(&0), *v.get(1).unwrap_or(&0)]) }) .collect::>(); - String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace("\0", "") + String::from_utf16(raw_utf16_composed.as_slice()).unwrap().replace('\0', "") } /// Gets the values from the slice and concatenates them