From 6d8672537f679942b3a7604c7a6974a574ddbbd5 Mon Sep 17 00:00:00 2001 From: szymon Date: Sat, 3 Oct 2026 21:37:45 +0200 Subject: [PATCH] fix: set messages next to crash during build --- build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 07cef5f..5341a97 100644 --- a/build.rs +++ b/build.rs @@ -2,7 +2,9 @@ use std::env; use std::path::PathBuf; fn main() { - let library = pkg_config::Config::new().probe("libnotify").unwrap(); + let library = pkg_config::Config::new() + .probe("libnotify") + .expect("Cannot locate libnotify. Is it installed?"); let paths = library .include_paths @@ -17,7 +19,8 @@ fn main() { .generate() .expect("Unable to generate bindings"); - let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + let out_path = + PathBuf::from(env::var("OUT_DIR").expect("Out $OUT_DIR not set. Perhaps a bindgen error?")); bindings .write_to_file(out_path.join("bindings.rs"))