From fdccf47a4351cad9412866f103622e9c18e2c2a6 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 20 Feb 2024 11:17:05 +0100 Subject: [PATCH] Use `.contains_key()` instead of retrieving the value --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 87e13f2..9ce5b32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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(),