Skip to content

Commit

Permalink
* apply cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondDantes committed Jan 9, 2025
1 parent bb8fa8b commit 01896e9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions windows_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,15 @@ impl DevelPack {

/// Returns the path of the PHP library containing symbols for linking.
pub fn php_lib(&self, is_debug: bool) -> PathBuf {

let php_lib_path = std::env::var("PHP_LIB")
.map(PathBuf::from)
.unwrap_or_else(|_| self.0.join("lib"));

if !php_lib_path.exists() {
panic!("Error: Specified PHP library path '{}' does not exist.", php_lib_path.display());
panic!(
"Error: Specified PHP library path '{}' does not exist.",
php_lib_path.display()
);
}

let candidates = if is_debug {
Expand All @@ -265,7 +267,10 @@ 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())
format!(
"Error: No suitable PHP library found in '{}'.",
php_lib_path.display()
)
}
))
}
Expand Down

0 comments on commit 01896e9

Please sign in to comment.