Conversation
Replaces the `//!` doc block in lib.rs with a single
`#![doc = include_str!("../README.md")]` so the crate root on
docs.rs and the GitHub README stay in sync without duplication.
The two relative `LICENSE-APACHE` / `LICENSE-MIT` links in the
README are switched to absolute GitHub URLs so they still resolve
when rendered from docs.rs (relative links would 404 from the
crate root URL there).
The doctest in the README — the `let data = b"hello, world!"...`
example — runs as the crate's doctest, replacing the identical
one that was inline in lib.rs. Verified locally:
- cargo test --doc (1 doctest passes)
- cargo doc --no-deps with RUSTDOCFLAGS=-D warnings (clean)
- cargo test --locked (28 unit + 18 parity tests pass)
- cargo clippy --all-targets --locked -- -D warnings (clean)
- cargo fmt --all -- --check (clean)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the inline
//!doc block in `src/lib.rs` with a single`#![doc = include_str!("../README.md")]` so the docs.rs landing page
and the GitHub README stay in sync without manual duplication.
The two relative LICENSE links in the README become absolute GitHub URLs
so they still resolve when rendered from docs.rs (relative links would
404 against the crate root URL there).
Why
The previous `//!` block was a strict subset of the README — every
section there is also in the README, plus the README has more (drop-in
compat status, benchmarks, error-type migration). Single source of truth
is easier to keep current.
Test plan