Skip to content

Commit a0824eb

Browse files
authored
Merge pull request #125 from stephank/fix/msrv
Fix compatibility with Rust 1.30
2 parents 6ff4b54 + 9e82a30 commit a0824eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ impl fmt::Display for Error {
159159
} => {
160160
match cause.kind() {
161161
io::ErrorKind::NotFound => {
162-
let crate_name = std::env::var("CARGO_PKG_NAME");
163-
let crate_name = crate_name.as_deref().unwrap_or("sys");
162+
let crate_name =
163+
std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "sys".to_owned());
164164
let instructions = if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
165165
"Try `brew install pkg-config` if you have Homebrew.\n"
166166
} else if cfg!(unix) {

0 commit comments

Comments
 (0)