Browse Source

Apply suggestions from code review

Co-authored-by: Ian Chamberlain <ian-h-chamberlain@users.noreply.github.com>
pull/134/head
Meziu 1 year ago committed by GitHub
parent
commit
fde132a111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      ctru-rs/src/console.rs
  2. 2
      ctru-rs/src/mii.rs
  3. 2
      ctru-rs/src/services/cam.rs
  4. 2
      ctru-rs/src/services/hid.rs

10
ctru-rs/src/console.rs

@ -21,15 +21,15 @@ static mut EMPTY_CONSOLE: PrintConsole = unsafe { const_zero::const_zero!(PrintC @@ -21,15 +21,15 @@ static mut EMPTY_CONSOLE: PrintConsole = unsafe { const_zero::const_zero!(PrintC
///
/// # Notes
///
/// The [`Console`] will take full possession of the screen handed to it as long as it stays alive. It also supports ANSI codes.
/// The [`Console`] will take full possession of the screen handed to it as long as it stays alive. It also supports some ANSI codes, such as text color and cursor positioning.
/// The [`Console`]'s window will have a size of 40x30 on the bottom screen, 50x30 on the normal top screen and
/// 100x30 on the top screen when wide mode is enabled.
///
/// # Alternatives
///
/// If you'd like to see live `stdout` output while running the application but cannnot/do not want to show the text on the 3DS itself,
/// If you'd like to see live `stdout` output while running the application but cannot or do not want to show the text on the 3DS itself,
/// you can try using [`Soc::redirect_to_3dslink`](crate::services::soc::Soc::redirect_to_3dslink) while activating the `--server` flag for `3dslink` (also supported by `cargo-3ds`).
/// More info in the `cargo-3ds` docs.
/// More info in the [`cargo-3ds` docs](https://github.com/rust3ds/cargo-3ds#running-executables).
#[doc(alias = "PrintConsole")]
pub struct Console<'screen> {
context: Box<PrintConsole>,
@ -41,7 +41,7 @@ impl<'screen> Console<'screen> { @@ -41,7 +41,7 @@ impl<'screen> Console<'screen> {
///
/// # Notes
///
/// This operation overwrites whatever was on the screen before the inizialization (including other [`Console`]s)
/// This operation overwrites whatever was on the screen before the initialization (including other [`Console`]s)
/// and changes the [`FramebufferFormat`](crate::services::gspgpu::FramebufferFormat) of the selected screen to better suit the [`Console`].
///
/// The new console is automatically selected for printing.
@ -144,7 +144,7 @@ impl<'screen> Console<'screen> { @@ -144,7 +144,7 @@ impl<'screen> Console<'screen> {
/// // Create a `Console` that takes control of the lower LCD screen.
/// let bottom_console = Console::new(gfx.bottom_screen.borrow_mut());
///
/// // Remember that `Console::new` automatically selects the new `Console` for ouput.
/// // Remember that `Console::new` automatically selects the new `Console` for output.
/// println!("I'm on the bottom screen!");
///
/// top_console.select();

2
ctru-rs/src/mii.rs

@ -245,7 +245,7 @@ pub struct MoleDetails { @@ -245,7 +245,7 @@ pub struct MoleDetails {
///
/// Some values are not ordered *like* the Mii Editor UI. The mapped values can be seen [here](https://www.3dbrew.org/wiki/Mii#Mapped_Editor_.3C-.3E_Hex_values).
///
/// This struct can be retrieved by [`MiiSelector::lauch()`](crate::applets::mii_selector::MiiSelector::launch).
/// This struct can be retrieved by [`MiiSelector::launch()`](crate::applets::mii_selector::MiiSelector::launch).
#[derive(Clone, Debug)]
pub struct Mii {
/// Mii options.

2
ctru-rs/src/services/cam.rs

@ -979,7 +979,7 @@ impl Cam { @@ -979,7 +979,7 @@ impl Cam {
/// # Notes
///
/// Playing the shutter sound does not require a living handle to the [`Ndsp`](crate::services::ndsp::Ndsp) service.
/// Volume will always be maxed out to ensure everyone within photo range can hear the picture being taken (as by japanese law).
/// Volume will always be maxed out to ensure everyone within photo range can hear the picture being taken (as by Japanese law).
///
/// # Example
///

2
ctru-rs/src/services/hid.rs

@ -66,7 +66,7 @@ bitflags! { @@ -66,7 +66,7 @@ bitflags! {
const DOWN = KeyPad::DPAD_DOWN.bits() | KeyPad::CPAD_DOWN.bits();
/// Direction Left (either D-Pad or C-Pad).
const LEFT = KeyPad::DPAD_LEFT.bits() | KeyPad::CPAD_LEFT.bits();
/// Direction Right (either D-Pad or C-Pad)..
/// Direction Right (either D-Pad or C-Pad).
const RIGHT = KeyPad::DPAD_RIGHT.bits() | KeyPad::CPAD_RIGHT.bits();
}
}

Loading…
Cancel
Save