diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index 9eda97e..8861ace 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -3,7 +3,7 @@ //! This applet opens a virtual keyboard on the console's bottom screen which lets the user write UTF-16 valid text. // TODO: Implement remaining functionality (password mode, filter callbacks, etc.). Also improve "max text length" API. Improve `number of buttons` API when creating a new SoftwareKeyboard. // TODO: Split the Parental PIN lock operations into a different type. -#[doc(alias = "keyboard")] +#![doc(alias = "keyboard")] use bitflags::bitflags; use ctru_sys::{ diff --git a/ctru-rs/src/services/am.rs b/ctru-rs/src/services/am.rs index c120541..68b3af3 100644 --- a/ctru-rs/src/services/am.rs +++ b/ctru-rs/src/services/am.rs @@ -5,8 +5,8 @@ //! - Install compatible applications to the console. //! //! TODO: [`ctru-rs`](crate) doesn't support installing or uninstalling titles yet. -#[doc(alias = "app")] -#[doc(alias = "manager")] +#![doc(alias = "app")] +#![doc(alias = "manager")] use crate::error::ResultCode; use crate::services::fs::FsMediaType; diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 57966f8..8d4af7b 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -2,7 +2,7 @@ //! //! The CAM service provides access to the built-in cameras. [`Camera`]s can return images //! in the form of byte vectors which can be displayed to the screen or used in other ways. -#[doc(alias = "camera")] +#![doc(alias = "camera")] use crate::error::{Error, ResultCode}; use crate::services::gspgpu::FramebufferFormat; diff --git a/ctru-rs/src/services/cfgu.rs b/ctru-rs/src/services/cfgu.rs index 9f90935..b1cbe76 100644 --- a/ctru-rs/src/services/cfgu.rs +++ b/ctru-rs/src/services/cfgu.rs @@ -1,7 +1,7 @@ //! System Configuration service. //! //! This module contains basic methods to retrieve the console's system configuration. -#[doc(alias = "configuration")] +#![doc(alias = "configuration")] use crate::error::ResultCode; diff --git a/ctru-rs/src/services/fs.rs b/ctru-rs/src/services/fs.rs index d79d73f..821b8b9 100644 --- a/ctru-rs/src/services/fs.rs +++ b/ctru-rs/src/services/fs.rs @@ -3,7 +3,7 @@ //! This module contains basic methods to manipulate the contents of the 3DS's filesystem. //! Only the SD card is currently supported. You should prefer using `std::fs`. // TODO: Refactor service to accomodate for various changes (such as SMDH support). Properly document the public API. -#[doc(alias = "filesystem")] +#![doc(alias = "filesystem")] use bitflags::bitflags; use std::ffi::OsString; diff --git a/ctru-rs/src/services/gfx.rs b/ctru-rs/src/services/gfx.rs index 73bb60a..68ac957 100644 --- a/ctru-rs/src/services/gfx.rs +++ b/ctru-rs/src/services/gfx.rs @@ -2,7 +2,7 @@ //! //! The GFX service controls (in a somewhat high-level way) the console's LCD screens. //! The screens are subordinate to the GFX service handle and can be used by only one borrower at a time. -#[doc(alias = "graphics")] +#![doc(alias = "graphics")] use std::cell::{Ref, RefCell, RefMut}; use std::marker::PhantomData; diff --git a/ctru-rs/src/services/hid.rs b/ctru-rs/src/services/hid.rs index 74c69c6..56a6035 100644 --- a/ctru-rs/src/services/hid.rs +++ b/ctru-rs/src/services/hid.rs @@ -3,9 +3,9 @@ //! The HID service provides read access to user input such as [button presses](Hid::keys_down), [touch screen presses](Hid::touch_position), //! and [circle pad information](Hid::circlepad_position). It also provides information from the sound volume slider, the accelerometer, and the gyroscope. // TODO: Implement volume slider, accelerometer and gyroscope + any other missing functionality. -#[doc(alias = "input")] -#[doc(alias = "controller")] -#[doc(alias = "gamepad")] +#![doc(alias = "input")] +#![doc(alias = "controller")] +#![doc(alias = "gamepad")] use crate::error::ResultCode; use bitflags::bitflags; diff --git a/ctru-rs/src/services/ndsp/mod.rs b/ctru-rs/src/services/ndsp/mod.rs index b109c98..8cda802 100644 --- a/ctru-rs/src/services/ndsp/mod.rs +++ b/ctru-rs/src/services/ndsp/mod.rs @@ -3,7 +3,7 @@ //! The NDSP service is used to handle communications to the DSP processor present on the console's motherboard. //! Thanks to the DSP processor the program can play sound effects and music on the console's built-in speakers or to any audio device //! connected via the audio jack. -#[doc(alias = "audio")] +#![doc(alias = "audio")] pub mod wave; use wave::{Status, Wave}; diff --git a/ctru-rs/src/services/romfs.rs b/ctru-rs/src/services/romfs.rs index 7b0f34f..e6f1c3b 100644 --- a/ctru-rs/src/services/romfs.rs +++ b/ctru-rs/src/services/romfs.rs @@ -18,8 +18,14 @@ //! ``` //! //! Alternatively, you can include the RomFS archive manually when building with `3dsxtool`. -#[doc(alias = "embed")] -#[doc(alias = "filesystem")] +//! +//! # Notes +//! +//! `std::path` has problems when parsing file paths that include the `romfs:` prefix. +//! As such, it's suggested to use the paths directly or to do simple append operations to avoid unexpected behaviour. +//! Related [issue](https://github.com/rust-lang/rust/issues/52331). +#![doc(alias = "embed")] +#![doc(alias = "filesystem")] use crate::error::ResultCode; use std::ffi::CStr; diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index b17cd86..d418919 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -2,8 +2,8 @@ //! //! By using this service the program enables the use of network sockets and utilities such as those found in `std::net`, which are completely inaccessible by default. //! As such, remember to hold a handle to this service handle while using any network functionality, or else the `std::net` methods will return generic OS errors. -#[doc(alias = "socket")] -#[doc(alias = "network")] +#![doc(alias = "socket")] +#![doc(alias = "network")] use libc::memalign; use std::net::Ipv4Addr;