Enable clippy::manual_flatten (#8739)

This PR enables the
[`clippy::manual_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#/manual_flatten)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-02 20:28:26 -05:00 committed by GitHub
parent f79f56f8b4
commit 503bebaacc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 33 deletions

View file

@ -3918,16 +3918,14 @@ impl BackgroundScanner {
let repository =
dotgit_path.and_then(|path| state.build_git_repository(path, self.fs.as_ref()));
for new_job in new_jobs {
if let Some(mut new_job) = new_job {
if let Some(containing_repository) = &repository {
new_job.containing_repository = Some(containing_repository.clone());
}
job.scan_queue
.try_send(new_job)
.expect("channel is unbounded");
for mut new_job in new_jobs.into_iter().flatten() {
if let Some(containing_repository) = &repository {
new_job.containing_repository = Some(containing_repository.clone());
}
job.scan_queue
.try_send(new_job)
.expect("channel is unbounded");
}
Ok(())