chore: collapse the ifs the 1.98 clippy flags
The pinned toolchain's clippy grew opinions the older lint let stand: nested if/if-let pairs it wants as let-chains, and a modulo test it wants as is_multiple_of. Machine-applied collapses, fmt-settled, no behavior change — the gauntlet runs clean again.
This commit is contained in:
1 parent
50e0a3b949
commit
e92739aa1b
12 files changed
+94
-96
No files matched your search
@@ -398,10 +398,10 @@ fn review_event(
|
||||
Some(timestamp) => timestamp,
|
||||
None => return Ok(None),
|
||||
};
|
||||
if let Some(since) = since {
|
||||
if timestamp < *since {
|
||||
return Ok(None);
|
||||
}
|
||||
if let Some(since) = since
|
||||
&& timestamp < *since
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
let id = required(row.id, "review id")?;
|
||||
Ok(Some(ForgeEvent {
|
||||
@@ -577,10 +577,10 @@ impl Forge for GiteaForge {
|
||||
];
|
||||
for row in self.paged::<WirePull>(&pulls_path, &query).await? {
|
||||
let updated = required(row.updated_at.clone(), "pull updated_at")?;
|
||||
if let Some(since) = since {
|
||||
if updated < *since {
|
||||
continue;
|
||||
}
|
||||
if let Some(since) = since
|
||||
&& updated < *since
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let number = required(row.number, "pull number")?;
|
||||
if let Some(event) = pull_event(&row, repo)? {
|
||||
|
||||
@@ -400,10 +400,10 @@ fn review_event(
|
||||
}
|
||||
// A review without a submission time was never submitted.
|
||||
let timestamp = required(row.submitted_at.clone(), "review submitted_at")?;
|
||||
if let Some(since) = since {
|
||||
if timestamp < *since {
|
||||
return Ok(None);
|
||||
}
|
||||
if let Some(since) = since
|
||||
&& timestamp < *since
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
let id = required(row.id, "review id")?;
|
||||
Ok(Some(ForgeEvent {
|
||||
|
||||
@@ -382,10 +382,10 @@ fn note_event(
|
||||
return Ok(None);
|
||||
}
|
||||
let timestamp = required(row.created_at.clone(), "note created_at")?;
|
||||
if let Some(since) = since {
|
||||
if timestamp < *since {
|
||||
return Ok(None);
|
||||
}
|
||||
if let Some(since) = since
|
||||
&& timestamp < *since
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
let id = required(row.id, "note id")?;
|
||||
Ok(Some(ForgeEvent {
|
||||
|
||||
Reference in new issue
Block a user