chore: justify the remaining keep-only cast + serde-default allows with reasons
This commit is contained in:
parent
30be7cd632
commit
f9fe3280f9
3 changed files with 13 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue