Skip to content

Commit c928556

Browse files
committed
Fix some intra-doc links.
1 parent b255980 commit c928556

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/string.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
//!
7070
//! The single-use macros are the most concise option, but also a rather
7171
//! special-case solution.
72-
//! `progmem_str` gives you are very temporary `&str` to an ad-hoc loaded
72+
//! [`progmem_str`](crate::progmem_str) gives you are very temporary `&str`
73+
//! to an ad-hoc loaded
7374
//! progmem string, so you can only pass it to a function call and you need
7475
//! enough RAM to store it.
7576
//! On the other hand, [`progmem_display`](crate::progmem_display) gives you
@@ -82,7 +83,7 @@
8283
//!
8384
//! # Examples
8485
//!
85-
//! Using [`PmString`] directly via the [`progmem`] macro:
86+
//! Using [`PmString`] directly via the [`progmem`](crate::progmem) macro:
8687
//!
8788
//! ```rust
8889
//! # use std::iter::FromIterator;
@@ -125,9 +126,9 @@
125126
//! # assert_eq!("Hello 大賢者", writer.0);
126127
//! ```
127128
//!
128-
//! Using the special literal in-line string macros [`progmem_str`]
129-
//! (yielding a `&str`) and [`progmem_display`] (yielding some
130-
//! `impl Display + uDisplay`):
129+
//! Using the special literal in-line string macros [`progmem_str`](crate::progmem_str)
130+
//! (yielding a `&str`) and [`progmem_display`](crate::progmem_display)
131+
//! (yielding some `impl Display + uDisplay`):
131132
//!
132133
//! ```rust
133134
//! use avr_progmem::progmem_str as F;
@@ -397,7 +398,7 @@ pub struct PmString<const N: usize> {
397398
impl<const N: usize> PmString<N> {
398399
/// Creates a new byte array from the given string
399400
///
400-
/// You are encouraged to use the [`progmem`] macro instead.
401+
/// You are encouraged to use the [`progmem`](crate::progmem) macro instead.
401402
///
402403
/// # Safety
403404
///
@@ -541,7 +542,7 @@ impl<'a, const N: usize> Iterator for PmChars<'a, N> {
541542
/// Similar to the C marco, this will load the full string into RAM at once
542543
/// and thus the string should be of limited size, to not exceed the space
543544
/// available in RAM.
544-
/// Also see the [progmem_display] macro which does not have this limitation.
545+
/// Also see the [progmem_display](crate::progmem_display) macro which does not have this limitation.
545546
///
546547
/// This macro allows to conveniently put a literal string into progmem
547548
/// right where it is used.

src/wrapper.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
//! caller must guarantee that the given pointer truly points to a valid value
1515
//! stored in progmem.
1616
//!
17-
//! As convenience, the [`progmem!`] macro is offered that will create
17+
//! As convenience, the [`progmem`] macro is offered that will create
1818
//! a `static` in progmem with the given value and wrap a pointer to it in the
1919
//! [`ProgMem`] struct for you.
2020
2121

22-
2322
use derivative::Derivative;
2423

24+
#[cfg(doc)]
25+
use crate::progmem;
2526
use crate::raw::read_value;
2627

2728

@@ -46,7 +47,7 @@ use crate::raw::read_value;
4647
/// is a very dangerous endeavor.
4748
///
4849
/// In order to make working with progmem safer and more convenient,
49-
/// consider using the [`progmem!`] macro, that will put the given data
50+
/// consider using the [`progmem`] macro, that will put the given data
5051
/// into a hidden `static` in progmem and provide you with an accessible static
5152
/// containing the pointer to it wrapped in `ProgMem`.
5253
///
@@ -155,7 +156,7 @@ impl<T> ProgMem<T> {
155156
/// See the Safety section for details.
156157
///
157158
/// You should not need to call this function directly.
158-
/// It is recommended to use the [`progmem!`] macro instead (which calls
159+
/// It is recommended to use the [`progmem`] macro instead (which calls
159160
/// this constructor for you, while enforcing its contract.
160161
///
161162
///

0 commit comments

Comments
 (0)