Skip to content

Commit 0bd7fce

Browse files
committed
refactor: simplify asio check
1 parent e7ac140 commit 0bd7fce

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

build.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";
44

55
fn main() {
66
println!("cargo:rerun-if-env-changed={CPAL_ASIO_DIR}");
7-
8-
// If ASIO directory isn't set silently return early
9-
// otherwise set the asio config flag
10-
match env::var(CPAL_ASIO_DIR) {
11-
Err(_) => {}
12-
Ok(_) => println!("cargo:rustc-cfg=asio"),
13-
};
7+
if env::var(CPAL_ASIO_DIR).is_ok() {
8+
println!("cargo:rustc-cfg=asio");
9+
}
1410
}

0 commit comments

Comments
 (0)