Skip to content

Commit adc5f33

Browse files
committed
Update documentation formatting for clarity and consistency
- Adjusted comments in `traits.rs`, `clock_ring.rs`, and `s3_fifo.rs` to improve alignment and readability of architectural diagrams. - Ensured consistent spacing and formatting across documentation sections to enhance overall presentation and user understanding.
1 parent c7064e5 commit adc5f33

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/ds/clock_ring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! │ │ │ hand = 1 │ │
2525
//! │ └────────────────┼────────────────┘ │
2626
//! │ │ │
27-
//! │ Entry: { key, value } + referenced: Vec<bool> │ │
27+
//! │ Entry: { key, value } + referenced: Vec<bool> │ │
2828
//! │ "A,1" = slot 0: Entry { key: "key_a" }, ref[0]=1 │ │
2929
//! │ "B,0" = slot 1: Entry { key: "key_b" }, ref[1]=0 ◄┘ (next victim) │
3030
//! │ │

src/policy/s3_fifo.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
//! ## Architecture
99
//!
1010
//! ```text
11-
//! ┌─────────────────────────────────────────────────────────────────────────
12-
//! │ S3FifoCache<K, V> Layout │
11+
//! ┌─────────────────────────────────────────────────────────────────────────┐
12+
//! │ S3FifoCache<K, V> Layout
1313
//! │ │
1414
//! │ map: HashMap<K, SlotId> arena: SlotArena<Node<K,V>> │
1515
//! │ ┌──────────┬──────────┐ ┌─────┬──────────────────────────┐ │
1616
//! │ │ Key │ SlotId │ │ Idx │ key, value, freq, links │ │
1717
//! │ ├──────────┼──────────┤ ├─────┼──────────────────────────┤ │
18-
//! │ │ "pg_1" │ id(0) │───────►│ 0 │ pg_1, data, 0 │ │
19-
//! │ │ "pg_2" │ id(1) │───────►│ 1 │ pg_2, data, 1 │ │
20-
//! │ │ "pg_3" │ id(2) │───────►│ 2 │ pg_3, data, 0 │ │
18+
//! │ │ "pg_1" │ id(0) │───────►│ 0 │ pg_1, data, 0 │ │
19+
//! │ │ "pg_2" │ id(1) │───────►│ 1 │ pg_2, data, 1 │ │
20+
//! │ │ "pg_3" │ id(2) │───────►│ 2 │ pg_3, data, 0 │ │
2121
//! │ └──────────┴──────────┘ └─────┴──────────────────────────┘ │
2222
//! │ │
2323
//! │ Queue Organisation (same as S3FifoCache, but index-linked) │
2424
//! │ │
2525
//! │ SMALL QUEUE: small_head ──► ... ──► small_tail │
2626
//! │ MAIN QUEUE: main_head ──► ... ──► main_tail │
2727
//! │ GHOST LIST: GhostList<K> (keys only) │
28-
//! └─────────────────────────────────────────────────────────────────────────
28+
//! └─────────────────────────────────────────────────────────────────────────┘
2929
//! ```
3030
//!
3131
//! ## Performance

src/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
//! │ pop_oldest() → (K, V) │ │ remove(&K) → Option<V> │ │ enable inspection │
3737
//! │ peek_oldest() → (&K, &V) │ │ remove_batch(&[K]) │ │ without side effects│
3838
//! │ age_rank(&K) → usize │ │ │ └──────────────────────┘
39-
//! │ │ └──────────────┬─────────────
39+
//! │ │ └──────────────┬─────────────┘
4040
//! │ ⚠ No arbitrary removal! │ │
4141
//! └────────────────────────────┘ │
4242
//! ┌───────────────┴───────────────┬──────────────────────┐

0 commit comments

Comments
 (0)