Skip to content

Commit

Permalink
Fix compatibility with Rust 1.30
Browse files Browse the repository at this point in the history
  • Loading branch information
stephank committed Oct 24, 2021
1 parent 6ff4b54 commit 9e82a30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ impl fmt::Display for Error {
} => {
match cause.kind() {
io::ErrorKind::NotFound => {
let crate_name = std::env::var("CARGO_PKG_NAME");
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());
let instructions = if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
"Try `brew install pkg-config` if you have Homebrew.\n"
} else if cfg!(unix) {
Expand Down

0 comments on commit 9e82a30

Please sign in to comment.