Release 0.3.1: sync docs.rs with README, declare MSRV - #5
Merged
Conversation
Docs and metadata only — no code or behavior changes.
- Crate-level docs are now sourced from the README via
`#![doc = include_str!("../README.md")]`, so docs.rs and crates.io no longer
drift. Previously docs.rs showed only the basic example while auth, retries,
with_client, and error handling lived only in the README. README `rust` fences
are annotated (`no_run` / `ignore`) so doctests still compile-verify the API.
- Declared `rust-version = "1.75"` (the generated trait uses async fn in traits).
- README: documented the method-naming rule; example links are now absolute so
they resolve on crates.io and docs.rs.
The README example (now the crate docs via include_str!) declared private structs that the generated pub trait leaks, which stable rustc rejects with E0446. Local 1.92 only warned; CI stable (1.97) errors. Make User/UserPath pub — a public generated trait genuinely requires public response types. Verified with +stable.
A stray git add -A on this branch swept up the macOS .DS_Store. Untrack it and add it to .gitignore so it can't recur.
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
Docs + metadata patch — no code or behavior changes. Closes the two alignment gaps found while auditing the published 0.3.0 as a newcomer would experience it.
The problem
beckonmacro — auth, retries,with_client, and error handling lived only in the README (crates.io). Worse, the macro's own doc said "see the crate-level docs for auth, retries…" while those docs didn't contain them.async fnin traits (Rust 1.75+), but nothing said so — a dev on older Rust hit a cryptic error.The fix
#![doc = include_str!("../README.md")]— the README is now the single source of truth for both surfaces; they can't drift again. READMErustfences are annotatedno_run(the full example, still compile-verified) /ignore(fragments) socargo teststays green.rust-version = "1.75"in Cargo.toml (also surfaces an MSRV badge on crates.io) + a README note.GET /users/{id}→get_users_by_id); example links made absolute so they resolve on crates.io and docs.rs.Verification
cargo fmt --check,clippy --all-targets -D warnings— cleanno_run, 6 ignored) — greencargo docbuilds; confirmed the rendered docs now contain Auth / Retry /with_client/ Errors / MSRVcargo publish --dry-runpackages cleanly (README included forinclude_str!)After this merges, the shipped story is fully in sync — clean base for 0.4.0 (typed error bodies).