From 18924dfcf45aac087e08f0cf4139f6548fb46a5e Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Thu, 31 Aug 2023 18:25:03 +0200 Subject: [PATCH] Rename functions to allowlist/blocklist --- ctru-rs/examples/mii-selector.rs | 2 +- ctru-rs/src/applets/mii_selector.rs | 38 ++++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ctru-rs/examples/mii-selector.rs b/ctru-rs/examples/mii-selector.rs index db3a9ea..2987970 100644 --- a/ctru-rs/examples/mii-selector.rs +++ b/ctru-rs/examples/mii-selector.rs @@ -19,7 +19,7 @@ fn main() { mii_selector.set_options(Options::ENABLE_CANCEL); mii_selector.set_initial_index(3); // The first user-made Mii cannot be used. - mii_selector.blacklist_user_mii(0.into()); + mii_selector.blocklist_user_mii(0.into()); mii_selector.set_title("Great Mii Selector!"); // Launch the Mii Selector and use its result to print the selected Mii's information. diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index bd0e4b4..a2ef72d 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -9,7 +9,7 @@ use std::{ffi::CString, fmt}; /// Index of a Mii on the [`MiiSelector`] interface. /// -/// See [`MiiSelector::whitelist_user_mii()`] and related functions for more information. +/// See [`MiiSelector::allowlist_user_mii()`] and related functions for more information. #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum Index { /// Specific Mii index. @@ -136,11 +136,11 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorSetOptions(self.config.as_mut(), options.bits()) } } - /// Whitelist a guest Mii based on its index. + /// Allowlist a guest Mii based on its index. /// /// # Notes /// - /// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. + /// Guest Mii's won't be available regardless of their allowlist/blocklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. /// Look into [`MiiSelector::set_options()`] to see how to work with options. /// /// # Example @@ -151,12 +151,12 @@ impl MiiSelector { /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// - /// // Whitelist the guest Mii at index 2. - /// mii_selector.whitelist_guest_mii(Index::Index(2)); + /// // Allowlist the guest Mii at index 2. + /// mii_selector.allowlist_guest_mii(Index::Index(2)); /// # } /// ``` #[doc(alias = "miiSelectorWhitelistGuestMii")] - pub fn whitelist_guest_mii(&mut self, mii_index: Index) { + pub fn allowlist_guest_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, @@ -165,11 +165,11 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorWhitelistGuestMii(self.config.as_mut(), index) } } - /// Blacklist a guest Mii based on its index. + /// Blocklist a guest Mii based on its index. /// /// # Notes /// - /// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. + /// Guest Mii's won't be available regardless of their allowlist/blocklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`]. /// Look into [`MiiSelector::set_options()`] to see how to work with options. /// /// # Example @@ -180,12 +180,12 @@ impl MiiSelector { /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// - /// // Blacklist the guest Mii at index 1 so that it cannot be selected. - /// mii_selector.blacklist_guest_mii(Index::Index(1)); + /// // Blocklist the guest Mii at index 1 so that it cannot be selected. + /// mii_selector.blocklist_guest_mii(Index::Index(1)); /// # } /// ``` #[doc(alias = "miiSelectorBlacklistGuestMii")] - pub fn blacklist_guest_mii(&mut self, mii_index: Index) { + pub fn blocklist_guest_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_GUESTMII_SLOTS, @@ -194,7 +194,7 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorBlacklistGuestMii(self.config.as_mut(), index) } } - /// Whitelist a user-created Mii based on its index. + /// Allowlist a user-created Mii based on its index. /// /// # Example /// @@ -204,12 +204,12 @@ impl MiiSelector { /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// - /// // Whitelist the user-created Mii at index 0. - /// mii_selector.whitelist_user_mii(Index::Index(0)); + /// // Allowlist the user-created Mii at index 0. + /// mii_selector.allowlist_user_mii(Index::Index(0)); /// # } /// ``` #[doc(alias = "miiSelectorWhitelistUserMii")] - pub fn whitelist_user_mii(&mut self, mii_index: Index) { + pub fn allowlist_user_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_USERMII_SLOTS, @@ -218,7 +218,7 @@ impl MiiSelector { unsafe { ctru_sys::miiSelectorWhitelistUserMii(self.config.as_mut(), index) } } - /// Blacklist a user-created Mii based on its index. + /// Blocklist a user-created Mii based on its index. /// /// # Example /// @@ -228,12 +228,12 @@ impl MiiSelector { /// use ctru::applets::mii_selector::{Index, MiiSelector}; /// let mut mii_selector = MiiSelector::new(); /// - /// // Blacklist all user-created Miis so that they cannot be selected. - /// mii_selector.blacklist_user_mii(Index::All); + /// // Blocklist all user-created Miis so that they cannot be selected. + /// mii_selector.blocklist_user_mii(Index::All); /// # } /// ``` #[doc(alias = "miiSelectorBlacklistUserMii")] - pub fn blacklist_user_mii(&mut self, mii_index: Index) { + pub fn blocklist_user_mii(&mut self, mii_index: Index) { let index = match mii_index { Index::Index(i) => i, Index::All => ctru_sys::MIISELECTOR_USERMII_SLOTS,