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
@@ -234,18 +234,18 @@ fn vevent_blocks(raw: &str) -> Vec<Vec<ContentLine>> {
|
||||
}
|
||||
"END" => {
|
||||
let component = line.value.trim().to_ascii_uppercase();
|
||||
if component == "VEVENT" {
|
||||
if let Some(block) = current.take() {
|
||||
blocks.push(block);
|
||||
}
|
||||
if component == "VEVENT"
|
||||
&& let Some(block) = current.take()
|
||||
{
|
||||
blocks.push(block);
|
||||
}
|
||||
stack.pop();
|
||||
}
|
||||
_ => {
|
||||
if stack.last().map(String::as_str) == Some("VEVENT") {
|
||||
if let Some(block) = current.as_mut() {
|
||||
block.push(line);
|
||||
}
|
||||
if stack.last().map(String::as_str) == Some("VEVENT")
|
||||
&& let Some(block) = current.as_mut()
|
||||
{
|
||||
block.push(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -755,10 +755,10 @@ fn expand_rule(
|
||||
if walked > MAX_CANDIDATES {
|
||||
return false;
|
||||
}
|
||||
if let Some(until) = rule.until {
|
||||
if start > until {
|
||||
return false;
|
||||
}
|
||||
if let Some(until) = rule.until
|
||||
&& start > until
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if start > window.to {
|
||||
return false;
|
||||
|
||||
@@ -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