Skip to content

Commit 1635b72

Browse files
committed
Fix clippy::doc_markdown warnings
1 parent cc010b3 commit 1635b72

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

src/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub type BinaryHeapView<T, K> = BinaryHeapInner<T, K, ViewVecStorage<T>>;
159159

160160
impl<T, K, const N: usize> BinaryHeap<T, K, N> {
161161
/* Constructors */
162-
/// Creates an empty BinaryHeap as a $K-heap.
162+
/// Creates an empty `BinaryHeap` as a $K-heap.
163163
///
164164
/// ```
165165
/// use heapless::binary_heap::{BinaryHeap, Max};

src/histbuf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ mod tests {
791791
assert_eq!(x.as_slice(), [5, 2, 3, 4]);
792792
}
793793

794-
/// Test whether .as_slices() behaves as expected.
794+
/// Test whether `.as_slices()` behaves as expected.
795795
#[test]
796796
fn as_slices() {
797797
let mut buffer: HistoryBuffer<u8, 4> = HistoryBuffer::new();
@@ -807,7 +807,7 @@ mod tests {
807807
extend_then_assert(b"123456", (b"34", b"56"));
808808
}
809809

810-
/// Test whether .as_slices() and .oldest_ordered() produce elements in the same order.
810+
/// Test whether `.as_slices()` and `.oldest_ordered()` produce elements in the same order.
811811
#[test]
812812
fn as_slices_equals_ordered() {
813813
let mut buffer: HistoryBuffer<u8, 6> = HistoryBuffer::new();

src/lib.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@
110110
),
111111
doc = "- [Object](pool::object::Object) -- objects managed by an object pool"
112112
)]
113-
//! - [BinaryHeap] -- priority queue
113+
//! - [`BinaryHeap`] -- priority queue
114114
//! - [Deque] -- double-ended queue
115-
//! - [HistoryBuffer] -- similar to a write-only ring buffer
116-
//! - [IndexMap] -- hash table
117-
//! - [IndexSet] -- hash set
118-
//! - [LinearMap]
119-
//! - [sorted_linked_list::SortedLinkedList]
115+
//! - [`HistoryBuffer`] -- similar to a write-only ring buffer
116+
//! - [`IndexMap`] -- hash table
117+
//! - [`IndexSet`] -- hash set
118+
//! - [`LinearMap`]
119+
//! - [`sorted_linked_list::SortedLinkedList`]
120120
//! - [String]
121121
//! - [Vec]
122122
//! - [`mpmc::Q*`](mpmc) -- multiple producer multiple consumer lock-free queue
123-
//! - [spsc] and [spsc::Queue] -- single producer single consumer lock-free queue
123+
//! - [spsc] and [`spsc::Queue`] -- single producer single consumer lock-free queue
124124
//!
125125
//! # Minimum Supported Rust Version (MSRV)
126126
//!
@@ -146,6 +146,7 @@
146146
clippy::redundant_pub_crate,
147147
clippy::option_if_let_else,
148148
clippy::ptr_as_ptr,
149+
clippy::doc_markdown,
149150
)]
150151

151152
pub use binary_heap::BinaryHeap;

src/mpmc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ pub struct MpMcQueueInner<T, S: Storage> {
142142

143143
/// MPMC queue with a capacity for N elements
144144
/// N must be a power of 2
145-
/// The max value of N is u8::MAX - 1 if `mpmc_large` feature is not enabled.
145+
/// The max value of N is `u8::MAX` - 1 if `mpmc_large` feature is not enabled.
146146
pub type MpMcQueue<T, const N: usize> = MpMcQueueInner<T, OwnedStorage<N>>;
147147

148148
/// MPMC queue with a capacity for N elements
149149
/// N must be a power of 2
150-
/// The max value of N is u8::MAX - 1 if `mpmc_large` feature is not enabled.
150+
/// The max value of N is `u8::MAX` - 1 if `mpmc_large` feature is not enabled.
151151
pub type MpMcQueueView<T> = MpMcQueueInner<T, ViewStorage>;
152152

153153
impl<T, const N: usize> MpMcQueue<T, N> {

src/spsc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
//! assert_eq!(rb.dequeue(), Some(0));
2828
//! ```
2929
//!
30-
//! - [Queue] can be [Queue::split] and then be used in Single Producer Single Consumer mode.
30+
//! - [Queue] can be [`Queue::split`] and then be used in Single Producer Single Consumer mode.
3131
//!
3232
//! "no alloc" applications can create a `&'static mut` reference to a `Queue` -- using a static
3333
//! variable -- and then `split` it: this consumes the static reference. The resulting `Consumer`

src/vec/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,11 @@ impl<T, S: VecStorage<T> + ?Sized> VecInner<T, S> {
619619
}
620620
}
621621

622-
/// Resizes the Vec in-place so that len is equal to new_len.
622+
/// Resizes the Vec in-place so that len is equal to `new_len`.
623623
///
624-
/// If new_len is greater than len, the Vec is extended by the
624+
/// If `new_len` is greater than len, the Vec is extended by the
625625
/// difference, with each additional slot filled with value. If
626-
/// new_len is less than len, the Vec is simply truncated.
626+
/// `new_len` is less than len, the Vec is simply truncated.
627627
///
628628
/// See also [`resize_default`](Self::resize_default).
629629
#[allow(clippy::result_unit_err)]

0 commit comments

Comments
 (0)