We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ff4b54 + 9e82a30 commit a0824ebCopy full SHA for a0824eb
src/lib.rs
@@ -159,8 +159,8 @@ impl fmt::Display for Error {
159
} => {
160
match cause.kind() {
161
io::ErrorKind::NotFound => {
162
- let crate_name = std::env::var("CARGO_PKG_NAME");
163
- let crate_name = crate_name.as_deref().unwrap_or("sys");
+ let crate_name =
+ std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "sys".to_owned());
164
let instructions = if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
165
"Try `brew install pkg-config` if you have Homebrew.\n"
166
} else if cfg!(unix) {
0 commit comments