Shorten the first paragraphs (#754)

Clippy was complaining that our first paragraphs were too long

- [x] no changelog update needed
This commit is contained in:
Gwilym Inzani 2024-08-28 12:16:08 +01:00 committed by GitHub
commit 716147ebae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 25 additions and 15 deletions

View file

@ -61,9 +61,10 @@ macro_rules! impl_zst_allocator {
pub(crate) use impl_zst_allocator; pub(crate) use impl_zst_allocator;
/// This is the allocator for the External Working Ram. This is currently /// This is the allocator for the External Working Ram.
/// equivalent to the Global Allocator (where things are allocated if no allocator is provided). This implements the allocator trait, so ///
/// is meant to be used in specifying where certain structures should be /// This is currently equivalent to the Global Allocator (where things are allocated if no allocator is provided).
/// This implements the allocator trait, so is meant to be used in specifying where certain structures should be
/// allocated. /// allocated.
/// ///
/// ```rust,no_run /// ```rust,no_run

View file

@ -14,10 +14,12 @@ struct AffineMatrixData {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub(crate) struct AffineMatrixVram(Rc<AffineMatrixData>); pub(crate) struct AffineMatrixVram(Rc<AffineMatrixData>);
/// An affine matrix that can be used on objects. It is just in time copied to /// An affine matrix that can be used on objects.
/// vram, so you can have as many as you like of these but you can only use up ///
/// to 16 in one frame. They are reference counted (Cloning is cheap) and /// It is just in time copied to vram, so you can have as many as you like
/// immutable, if you want to change a matrix you must make a new one and set it /// of these but you can only use up to 16 in one frame. They are reference
/// counted (Cloning is cheap) and immutable, if you want to change a matrix
/// you must make a new one and set it
/// on all your objects. /// on all your objects.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct AffineMatrixInstance { pub struct AffineMatrixInstance {

View file

@ -74,8 +74,9 @@ macro_rules! align_bytes {
}}; }};
} }
/// Includes sprites found in the referenced aseprite files. Can include /// Includes sprites found in the referenced aseprite files.
/// multiple at once and optimises palettes of all included in the single call ///
/// Can include multiple at once and optimises palettes of all included in the single call
/// together. See [Size] for supported sizes. Returns a reference to [Graphics]. /// together. See [Size] for supported sizes. Returns a reference to [Graphics].
/// ///
/// ```rust,no_run /// ```rust,no_run

View file

@ -6,9 +6,11 @@ use crate::{dma, fixnum::Rect, memory_mapped::MemoryMapped};
use super::{tiled::BackgroundID, DISPLAY_CONTROL, HEIGHT, WIDTH}; use super::{tiled::BackgroundID, DISPLAY_CONTROL, HEIGHT, WIDTH};
/// The windows feature of the Game Boy Advance can selectively display /// Access to the windows feature of the Game Boy Advance.
/// backgrounds or objects on the screen and can selectively enable and disable ///
/// effects. This gives out references and holds changes before they can be committed. /// The windows feature can selectively display backgrounds or objects on the screen
/// and can selectively enable and disable effects. This gives out references and
/// holds changes before they can be committed.
pub struct Windows<'gba> { pub struct Windows<'gba> {
wins: [MovableWindow; 2], wins: [MovableWindow; 2],
out: Window, out: Window,

View file

@ -342,6 +342,8 @@ impl VBlank {
} }
#[must_use] #[must_use]
/// A basic profiler you can use to find hot functions in your code.
///
/// The behaviour of this function is undefined in the sense that it will output /// The behaviour of this function is undefined in the sense that it will output
/// some information in some way that can be interpreted in a way to give some /// some information in some way that can be interpreted in a way to give some
/// profiling information. What it outputs, how it outputs it, and how to /// profiling information. What it outputs, how it outputs it, and how to

View file

@ -125,9 +125,11 @@ enum SoundPriority {
Low, Low,
} }
/// The supported frequencies within AGB. These are chosen to work well with /// The supported frequencies within AGB.
/// the hardware. Note that the higher the frequency, the better the quality of ///
/// the sound but the more CPU time sound mixing will take. /// These are chosen to work well with/ the hardware. Note that the higher
/// the frequency, the better the quality of the sound but the more CPU time
/// sound mixing will take.
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive] #[non_exhaustive]
pub enum Frequency { pub enum Frequency {