Skip to content

Commit

Permalink
Use .contains_key() instead of retrieving the value
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Feb 20, 2024
1 parent 2d6a687 commit fdccf47
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 fdccf47

Please sign in to comment.