docs(readme): use absolute URLs for logo images#21
Conversation
Three new clippy errors started firing on `-D warnings` after the
rust-1.95 release:
- `clippy::manual_checked_ops` in src/catalog/builder.rs: rewrite
the `pct` closure with `checked_div(total).unwrap_or(0)`, which
is semantically identical to the existing `if total == 0 { 0 }
else { (n * 100) / total }` form.
- `clippy::unnecessary_sort_by` in src/catalog/index.rs (x2):
replace `sort_by(|a, b| b.1.cmp(&a.1))` with
`sort_by_key(|b| std::cmp::Reverse(b.1))`. Both forms produce a
stable sort by `.1` descending.
No behavioral change. Unblocks the pre-commit hook so README and
other commits can land again.
Use https://raw.githubusercontent.com/<org>/<repo>/main/... for logo references so they render on crates.io. Relative paths render correctly on GitHub but are dropped by the crates.io README sanitizer, leaving a broken image at the top of every crate page.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 31 minutes and 1 second.Comment |
Why
crates.io strips relative image paths from rendered READMEs, so the logo at the top of this crate's page on crates.io is broken. Switching to absolute
raw.githubusercontent.comURLs renders correctly on both GitHub and crates.io.What changed
srcset/srcpaths with absolute raw URLs pinned tomain.<picture>dark/light switching; crates.io ignores<source>and falls back to the<img>(light variant), which is the same behavior as before, just no longer broken.Note
The crate page itself only updates on the next published version — this PR prevents future releases from being broken, but doesn't refresh the existing crate page.
(Replaces #20, which auto-closed when its base
fix/clippy-1.95-warningswas deleted on merge of #19.)