Skip to content

Commit

Permalink
* use expect for better code style
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondDantes committed Jan 8, 2025
1 parent 4a8758b commit bb8fa8b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions windows_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,21 @@ impl DevelPack {
.iter()
.map(|lib| php_lib_path.join(lib))
.find(|path| path.exists())
.unwrap_or_else(||
panic!(
"{}",
if is_debug {
format!(
r#"Error: No suitable PHP library found in '{}'.
.expect(&format!(
"{}",
if is_debug {
format!(
r#"Error: No suitable PHP library found in '{}'.
To build the application in DEBUG mode on Windows,
you must have a PHP SDK built with the DEBUG option enabled
and specify the PHP_LIB to the folder containing the lib files.
For example: set PHP_LIB=C:\php-sdk\php-dev\vc16\x64\php-8.3.13-src\x64\Debug_TS."#,
php_lib_path.display()
)
} else {
format!("Error: No suitable PHP library found in '{}'.", php_lib_path.display())
}
))
php_lib_path.display()
)
} else {
format!("Error: No suitable PHP library found in '{}'.", php_lib_path.display())
}
))
}

/// Returns a list of include paths to pass to the compiler.
Expand Down

0 comments on commit bb8fa8b

Please sign in to comment.