Skip to content

Commit ef72e44

Browse files
committed
Fix rustdoc warnings
Mostly around the links. [Linking by name](https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html) works how we need in most cases now.
1 parent 2ac7c9f commit ef72e44

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/display/mod.rs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
//! The [`Render`] trait defines the interface that an image-like type needs
4848
//! to provide in order to be displayed.
4949
//!
50-
//! It contains a single function: [`brightness_at(x,
51-
//! y)`][display::Render::brightness_at], returning a brightness level.
50+
//! It contains a single function: [`brightness_at(x, y)`](Render::brightness_at),
51+
//! returning a brightness level.
5252
//!
5353
//! The [`image`] submodule provides two static image types implementing
5454
//! `Render`:
@@ -77,7 +77,7 @@
7777
//!
7878
//! # Timer integration
7979
//!
80-
//! The `Display` expects to control a single timer. It can use the
80+
//! The [`Display`] expects to control a single timer. It can use the
8181
//! micro:bit's `TIMER0`, `TIMER1`, or `TIMER2`.
8282
//!
8383
//! This uses a 6ms period to light each of the three internal LED rows, so
@@ -100,14 +100,14 @@
100100
//! When your program starts:
101101
//! * create a [`MicrobitDisplayTimer`] struct, passing the timer you chose to
102102
//! [`MicrobitDisplayTimer::new()`]
103-
//! * call [`initialise_display()`], passing it the `MicrobitDisplayTimer` and
104-
//! the gpio peripheral
103+
//! * call [`initialise_display()`], passing it the `MicrobitDisplayTimer` and the
104+
//! [`crate::led::Pins`]
105105
//! * create a [`Display`] struct (a `Display<MicrobitFrame>`).
106106
//!
107107
//! In an interrupt handler for the timer, call [`handle_display_event()`].
108108
//!
109109
//! To change what's displayed: create a [`MicrobitFrame`] instance, use
110-
//! [`.set()`](`display::Frame::set()`) to put an image (something implementing
110+
//! [`.set()`](`Frame::set()`) to put an image (something implementing
111111
//! [`Render`]) in it, then call [`Display::set_frame()`]. Note you'll have to
112112
//! `use microbit::display::Frame` to make `set()` available.
113113
//!
@@ -121,22 +121,6 @@
121121
//!
122122
//! [dal]: https://lancaster-university.github.io/microbit-docs/
123123
//! [micropython]: https://microbit-micropython.readthedocs.io/
124-
//!
125-
//! [`BitImage`]: display::image::BitImage
126-
//! [`Display`]: display::Display
127-
//! [`Display::set_frame()`]: display::Display::set_frame
128-
//! [`Frame`]: display::Frame
129-
//! [`Matrix`]: display::Matrix
130-
//! [`MicrobitFrame`]: display::MicrobitFrame
131-
//! [`MicrobitDisplayTimer`]: display::MicrobitDisplayTimer
132-
//! [`MicrobitDisplayTimer::new()`]: display::MicrobitDisplayTimer::new
133-
//! [`Render`]: display::Render
134-
//! [`image`]: display::image
135-
//! [`handle_display_event()`]: display::handle_display_event
136-
//! [`initialise_display()`]: display::initialise_display
137-
//! [`DisplayTimer`]: tiny_led_matrix::DisplayTimer
138-
//! [`GreyscaleImage`]: display::image::GreyscaleImage
139-
//!
140124
141125
#[doc(no_inline)]
142126
pub use tiny_led_matrix::{Display, Frame, Render, MAX_BRIGHTNESS};

0 commit comments

Comments
 (0)