Skip to content

Commit

Permalink
Minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Jul 19, 2021
1 parent 69826fd commit 74b3bd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

//! A simple, fast, least-recently-used (LRU) cache.
//!
//! `LRUCache` uses a fixed-capacity array for storage. It provides `O(1)` insertion, and `O(n)`
//! [`LRUCache`] uses a fixed-capacity array for storage. It provides `O(1)` insertion, and `O(n)`
//! lookup. It does not require an allocator and can be used in `no_std` crates.
//!
//! See the [`LRUCache`](LRUCache) docs for details.
Expand Down Expand Up @@ -162,7 +162,7 @@ impl<T, const N: usize> LRUCache<T, N> {
self.entries.len()
}

/// Returns whether the entries `ArrayVec` is empty.
/// Returns true if the cache is empty.
#[inline]
pub fn is_empty(&self) -> bool {
self.entries.is_empty()
Expand Down Expand Up @@ -318,7 +318,7 @@ impl<'a, T, const N: usize> IterMut<'a, T, N> {
}
}

/// Iterator over values in an `LRUCache`, from most-recently-used to least-recently-used.
/// Iterator over values in an [`LRUCache`], from most-recently-used to least-recently-used.
pub struct Iter<'a, T, const N: usize> {
cache: &'a LRUCache<T, N>,
pos: u16,
Expand Down

0 comments on commit 74b3bd7

Please sign in to comment.