aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installed_versions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/installed_versions.rs')
-rw-r--r--crates/shirabe/src/installed_versions.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/shirabe/src/installed_versions.rs b/crates/shirabe/src/installed_versions.rs
index fb6e8bf..fb1f73f 100644
--- a/crates/shirabe/src/installed_versions.rs
+++ b/crates/shirabe/src/installed_versions.rs
@@ -111,12 +111,11 @@ impl InstalledVersions {
.cloned()
.unwrap_or_default();
for (name, package) in versions {
- if let Some(pkg) = package.as_array() {
- if let Some(pkg_type) = pkg.get("type").and_then(|v| v.as_string()) {
- if pkg_type == r#type {
- packages_by_type.push(name);
- }
- }
+ if let Some(pkg) = package.as_array()
+ && let Some(pkg_type) = pkg.get("type").and_then(|v| v.as_string())
+ && pkg_type == r#type
+ {
+ packages_by_type.push(name);
}
}
}