diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61f6c0ec..f713aa99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,9 @@ jobs: - name: Clippy run: cargo clippy --tests --benches -- -D clippy::all + - name: Docs + run: cargo doc --target wasm32-unknown-unknown + - name: Test run: cargo test -- --color always env: diff --git a/Cargo.toml b/Cargo.toml index a5eb1e9e..7c3c80c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,10 @@ readme = "README.md" repository = "https://github.com/dfinity/stable-structures" version = "0.6.9" +[package.metadata.docs.rs] +# Build docs for wasm32-unknown-unknown target +targets = ["wasm32-unknown-unknown"] + [dependencies] canbench-rs = { workspace = true, optional = true } # Optional to benchmark parts of the code. ic_principal.workspace = true @@ -28,6 +32,10 @@ test-strategy.workspace = true [features] bench_scope = ["dep:canbench-rs"] # May add significant overhead. +[lints.rustdoc] +# Make rustdoc warnings into errors +all = "deny" + [workspace] members = ["benchmarks"] diff --git a/src/btreemap.rs b/src/btreemap.rs index a78e8a8f..40debbd4 100644 --- a/src/btreemap.rs +++ b/src/btreemap.rs @@ -1202,13 +1202,13 @@ where } } - /// **Deprecated**: use [`iter_from_prev_key`] instead. + /// **Deprecated**: use `iter_from_prev_key` instead. /// /// The name `iter_upper_bound` was misleading — it suggested an inclusive /// upper bound. In reality, it starts from the largest key strictly less /// than the given bound. /// - /// The new name, [`iter_from_prev_key`], better reflects this behavior and + /// The new name, `iter_from_prev_key`, better reflects this behavior and /// improves code clarity. #[deprecated(note = "use `iter_from_prev_key` instead")] pub fn iter_upper_bound(&self, bound: &K) -> Iter<'_, K, V, M> {