Skip to content

Commit 74162b1

Browse files
authored
Merge pull request #6 from ia0/svgbobdoc
doc: bump svgbobdoc to 0.3.0
2 parents ace42a1 + 58d5de3 commit 74162b1

File tree

3 files changed

+39
-33
lines changed

3 files changed

+39
-33
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Bump `svgbobdoc` to `^0.3` to address a future-incompat report
13+
[rust-lang/rust#79813](https://github.com/rust-lang/rust/issues/79813)
14+
1015
## [0.2.0] - 2022-08-31
1116

1217
### Changed

crates/rlsf/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ categories = ["embedded", "no-std", "wasm", "memory-management", "web-programmin
1111
repository = "https://github.com/yvt/rlsf"
1212

1313
[features]
14-
doc_cfg = []
14+
doc_cfg = ["svgbobdoc/enable"]
1515
std = []
1616
unstable = []
1717

1818
[dependencies]
19-
svgbobdoc = { version = "0.2.2" }
19+
svgbobdoc = { version = "0.3.0" }
2020
cfg-if = "1.0.0"
2121
const_default1 = { version = "1", package = "const-default" }
2222

crates/rlsf/src/tlsf.rs

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,44 @@ use crate::{
1515
utils::{nonnull_slice_from_raw_parts, nonnull_slice_len, nonnull_slice_start},
1616
};
1717

18-
#[cfg_attr(doc, svgbobdoc::transform)]
18+
#[doc = svgbobdoc::transform!(
1919
/// The TLSF header (top-level) data structure.
2020
///
2121
/// # Data Structure Overview
2222
///
2323
/// <center>
2424
/// ```svgbob
2525
/// First level
26-
/// FLLEN = 8
27-
/// ,-----+-----+-----+-----+-----+-----+-----+-----,
28-
/// fl_bitmap: FLBitmap = | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
29-
/// +-----+-----+-----+-----+-----+-----+-----+-----+
30-
/// min size | 2¹¹ | 2¹⁰ | 2⁹ | 2⁸ | 2⁷ | 2⁶ | 2⁵ | 2⁴ |
31-
/// '-----+-----+-----+--+--+-----+-----+-----+-----'
32-
/// |
33-
/// ╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶|╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶
34-
/// Second Level |
35-
/// v SLLEN = 8
36-
/// ,-----+-----+-----+-----+-----+-----+-----+-----,
37-
/// "sl_bitmap[4]: SLBitmap"= | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
38-
/// +-----+-----+-----+-----+-----+-----+-----+-----+
39-
/// min size 2⁸(1+n/8) | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
40-
/// +-----+-----+-----+-----+-----+-----+-----+-----+
41-
/// first_free | | | O | | | | | |
42-
/// '-----+-----+--|--+-----+-----+-----+-----+-----'
43-
/// |
44-
/// | size = 416..448
45-
/// |
46-
/// ╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶|╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶
47-
/// Free blocks |
48-
/// |
49-
/// ,-----------------------------------'
50-
/// | ,---+---+-------, ,---+---+-------, ,---+---+-------,
51-
/// '-+>O | O-+-------+----+>O | O-+-------+----+>O | | |
52-
/// +---+---' | +---+---' | +---+---' |
53-
/// | | | | | |
54-
/// | | | | | |
55-
/// '---------------' '---------------' '---------------'
26+
/// "FLLEN = 8"
27+
/// ╭─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────╮
28+
/// "fl_bitmap: FLBitmap ="│ 0 0 0 1 0 0 0 0
29+
/// ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
30+
/// "min size"│ 2¹¹ 2¹⁰ 2⁹ 2⁸ 2⁷ 2⁶ 2⁵ 2⁴
31+
/// ╰─────┴─────┴─────┴──┬──┴─────┴─────┴─────┴─────╯
32+
///
33+
/// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
34+
/// Second Level
35+
/// v "SLLEN = 8"
36+
/// ╭─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────╮
37+
/// "sl_bitmap[4]: SLBitmap ="│ 0 0 1 0 0 0 0 0
38+
/// ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
39+
/// "min size 2⁸(1+n/8)"│ 7 6 5 4 3 2 1 0
40+
/// ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
41+
/// "first_free"│ │ ○ │
42+
/// ╰─────┴─────┴──┼──┴─────┴─────┴─────┴─────┴─────╯
43+
///
44+
/// │ "size = 416..448"
45+
///
46+
/// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
47+
/// Free blocks
48+
///
49+
/// ╭───────────────────────────────────╯
50+
/// │ ╭───┬───┬───────╮ ╭───┬───┬───────╮ ╭───┬───┬───────╮
51+
/// ╰─┼>○ │ ○─┼───────┼────┼>○ │ ○─┼───────┼────┼>○ │
52+
/// ├───┴───╯ ├───┴───╯ ├───┴───╯
53+
///
54+
///
55+
/// ╰───────────────╯ ╰───────────────╯ ╰───────────────╯
5656
/// 416 bytes 432 bytes 416 bytes
5757
/// ```
5858
/// </center>
@@ -64,6 +64,7 @@ use crate::{
6464
///
6565
/// The maximum block size is `(GRANULARITY << FLLEN) - GRANULARITY`.
6666
///
67+
)]
6768
#[derive(Debug)]
6869
pub struct Tlsf<'pool, FLBitmap, SLBitmap, const FLLEN: usize, const SLLEN: usize> {
6970
fl_bitmap: FLBitmap,

0 commit comments

Comments
 (0)