From dccf91f4af66a49c54f572924d25f78897b9e523 Mon Sep 17 00:00:00 2001 From: plasmaDestroyer Date: Fri, 20 Feb 2026 04:29:27 +0530 Subject: [PATCH] fix: replace unwrap() with descriptive error messages in dynamic_linking --- build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index a93300a..f1e4d02 100644 --- a/build.rs +++ b/build.rs @@ -417,9 +417,12 @@ fn dynamic_linking(env_vars: EnvVars) { stem.trim_start_matches("lib") } }) - .unwrap() + .expect("FFMPEG_DLL_PATH does not point to a valid file. Ensure the path includes a filename.") .to_string(), - ffmpeg_dll_path.parent().unwrap().to_path_buf(), + ffmpeg_dll_path + .parent() + .expect("FFMPEG_DLL_PATH has no parent directory. Please provide a full path including the directory.") + .to_path_buf(), ); linking_with_single_lib(&lib_name, &ffmpeg_dll_dir, FFmpegLinkMode::Dynamic); }