Browse Source

Fmt and docs lints

pull/137/head
Andrea Ciliberti 1 year ago
parent
commit
28a8b08f09
  1. 10
      ctru-rs/src/services/cam.rs
  2. 4
      ctru-rs/src/services/hid.rs

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

@ -239,10 +239,7 @@ pub enum ShutterSound {
pub enum Trimming { pub enum Trimming {
/// Trimming configuration relatively to the center of the image. /// Trimming configuration relatively to the center of the image.
#[allow(missing_docs)] #[allow(missing_docs)]
Centered{ Centered { width: i16, height: i16 },
width: i16,
height: i16,
},
/// Trimming disabled. /// Trimming disabled.
Off, Off,
} }
@ -1110,10 +1107,7 @@ impl Trimming {
// Pixel area must be a multiple of 128. // Pixel area must be a multiple of 128.
assert!((width * height) % 128 == 0); assert!((width * height) % 128 == 0);
Self::Centered { Self::Centered { width, height }
width,
height,
}
} }
/// Create a new [`Trimming`] configuration using a standard view size centered to the original image. /// Create a new [`Trimming`] configuration using a standard view size centered to the original image.

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

@ -92,7 +92,7 @@ pub enum Error {
/// Representation of the acceleration vector read by the accelerometer. /// Representation of the acceleration vector read by the accelerometer.
/// ///
/// Have a look at [`Hid::enable_accelerometer()`] for more information. /// Have a look at [`Hid::set_accelerometer()`] for more information.
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq)] #[derive(Default, Copy, Clone, Debug, PartialEq, Eq)]
pub struct Acceleration { pub struct Acceleration {
@ -103,7 +103,7 @@ pub struct Acceleration {
/// Representation of the angular rate read by the gyroscope. /// Representation of the angular rate read by the gyroscope.
/// ///
/// Have a look at [`Hid::enable_gyroscope())`] for more information. /// Have a look at [`Hid::set_gyroscope()`] for more information.
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq)] #[derive(Default, Copy, Clone, Debug, PartialEq, Eq)]
pub struct AngularRate { pub struct AngularRate {

Loading…
Cancel
Save