Skip to content

Commit

Permalink
Merge pull request #804 from travier/main-clippy-lints
Browse files Browse the repository at this point in the history
src: Fix 'contains_key' clippy lints
  • Loading branch information
cgwalters authored Dec 18, 2024
2 parents 2a2a0f0 + 0d7c621 commit 26c5852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub(crate) fn adopt_and_update(name: &str) -> Result<ContentMetadata> {
let sysroot = openat::Dir::open("/")?;
let mut state = SavedState::load_from_disk("/")?.unwrap_or_default();
let component = component::new_from_name(name)?;
if state.installed.get(name).is_some() {
if state.installed.contains_key(name) {
anyhow::bail!("Component {} is already installed", name);
};

Expand Down
2 changes: 1 addition & 1 deletion src/filetree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl FileTree {
}
if check_additions {
for k in updated.children.keys() {
if self.children.get(k).is_some() {
if self.children.contains_key(k) {
continue;
}
additions.insert(k.clone());
Expand Down

0 comments on commit 26c5852

Please sign in to comment.