Merge pull request #855 from tamird/fix-lint

init: appease clippy
pull/858/head
Tamir Duberstein 11 months ago committed by GitHub
commit 44f416a617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -123,8 +123,7 @@ fn run() -> anyhow::Result<()> {
// Iterate files in /bin.
let read_dir = std::fs::read_dir("/bin").context("read_dir(/bin) failed")?;
let errors = read_dir
.filter_map(|entry| {
match (|| {
.map(|entry| {
let entry = entry.context("read_dir(/bin) failed")?;
let path = entry.path();
let status = std::process::Command::new(&path)
@ -137,10 +136,10 @@ fn run() -> anyhow::Result<()> {
} else {
Err(anyhow::anyhow!("{} failed: {status:?}", path.display()))
}
})() {
})
.filter_map(|result| match result {
Ok(()) => None,
Err(err) => Some(err),
}
})
.collect::<Vec<_>>();
if errors.is_empty() {

Loading…
Cancel
Save