Skip to content

Commit

Permalink
Merge pull request #59 from samueltardieu/use-contains-key
Browse files Browse the repository at this point in the history
Use `.contains_key()` instead of retrieving the value
  • Loading branch information
pkgw authored Feb 21, 2024
2 parents 2d6a687 + fdccf47 commit 79f292f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ impl Config {
if self.required_libs.is_empty() {
let ports = try!(load_ports(&vcpkg_target));

if ports.get(&port_name.to_owned()).is_none() {
if !ports.contains_key(port_name) {
return Err(Error::LibNotFound(format!(
"package {} is not installed for vcpkg triplet {}",
port_name.to_owned(),
Expand Down

0 comments on commit 79f292f

Please sign in to comment.