Clippy clean, and rustfmt and clippy part of the checks
cargo clippy --workspace --all-targets had 24 warnings; its own fixes took most, the rest by hand: two type aliases for long types, a struct built whole, a checked division, a doc comment's stray blank line. Its fix for the stale-feed fold was wrong: `any` stops at the first feed it removes, where the fold removed every one, so that is a loop instead. A pre-commit hook in .githooks refuses unformatted Rust; clippy, being a build, is in CLAUDE.md's checks with -D warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -386,8 +386,11 @@ fn patreon_campaign(head: &[u8]) -> Option<String> {
|
||||
})
|
||||
}
|
||||
|
||||
/// A campaign's name, and its shows as (id, title).
|
||||
type PatreonShows = (Option<String>, Vec<(String, String)>);
|
||||
|
||||
/// A campaign's name and its shows as (id, title), from Patreon's JSON:API answer.
|
||||
fn parse_patreon_shows(json: &[u8]) -> Result<(Option<String>, Vec<(String, String)>)> {
|
||||
fn parse_patreon_shows(json: &[u8]) -> Result<PatreonShows> {
|
||||
let v: serde_json::Value = serde_json::from_slice(json).context("Patreon's answer is not JSON")?;
|
||||
// Missing is not the same as none. Read as no shows, the creator feed would be scanned as
|
||||
// a plain feed, claim every show's files, and leave the shows empty once the list returned.
|
||||
|
||||
Reference in New Issue
Block a user