Fix doc errors and warnings

This commit is contained in:
Gwilym Kuiper 2022-11-01 22:02:51 +00:00
parent e24ef69e0f
commit 6319fd3a20
3 changed files with 4 additions and 3 deletions

View file

@ -14,7 +14,7 @@ use crate::{
/// The abstraction allows only for static tiles, but it is possible to animate the tiles if needed.
///
/// When you create a new infinite scrolled map, you need to provide a background which it will render itself
/// onto and a function which takes a Vector2D<i32> position and returns which tile should be rendered there.
/// onto and a function which takes a `Vector2D<i32>` position and returns which tile should be rendered there.
///
/// The passed function should handle being out of bounds, as the scrolled map does buffer around the edges slightly.
///

View file

@ -153,7 +153,7 @@ impl ButtonController {
#[must_use]
/// Returns [Tri::Positive] if left was just pressed, [Tri::Negative] if right was just pressed and [Tri::Zero] if neither or both are just pressed.
///
/// Also returns [Tri::Zero] after the call to [update()] if the button is still held.
/// Also returns [Tri::Zero] after the call to [`update()`](ButtonController::update()) if the button is still held.
pub fn just_pressed_x_tri(&self) -> Tri {
let left = self.is_just_pressed(Button::LEFT);
let right = self.is_just_pressed(Button::RIGHT);
@ -164,7 +164,7 @@ impl ButtonController {
#[must_use]
/// Returns [Tri::Positive] if down was just pressed, [Tri::Negative] if up was just pressed and [Tri::Zero] if neither or both are just pressed.
///
/// Also returns [Tri::Zero] after the call to [update()] if the button is still held.
/// Also returns [Tri::Zero] after the call to [`update()`](ButtonController::update()) if the button is still held.
pub fn just_pressed_y_tri(&self) -> Tri {
let up = self.is_just_pressed(Button::UP);
let down = self.is_just_pressed(Button::DOWN);

View file

@ -24,6 +24,7 @@
#![deny(clippy::cloned_instead_of_copied)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![deny(rustdoc::invalid_html_tags)]
//! # agb
//! `agb` is a library for making games on the Game Boy Advance using the Rust