chore: justify the remaining keep-only cast + serde-default allows with reasons

This commit is contained in:
damocles 2026-06-06 13:38:46 +02:00
commit f9fe3280f9
3 changed files with 13 additions and 3 deletions

View file

@ -99,7 +99,10 @@ fn fetch_head(client: &Client, repo: &str, number: u64, limit: u64) -> Result<Ve
/// first to know how many exist, then start paginating from the
/// page that contains item `total - n`. Work is bounded by
/// `ceil(n/50) + 1` page fetches, regardless of thread length.
#[allow(clippy::cast_possible_truncation)]
#[allow(
clippy::cast_possible_truncation,
reason = "the forge `comments` count cast to usize is a small issue-thread length, never anywhere near usize::MAX even on a 32-bit target, so it cannot truncate in practice"
)]
fn fetch_tail(client: &Client, repo: &str, number: u64, n: usize) -> Result<Vec<Value>> {
if n == 0 {
return Ok(Vec::new());