mirror of
https://github.com/doukutsu-rs/cpal.git
synced 2026-08-24 13:03:40 -07:00
Specifying the static lifetime in constants and static variables is redundant since Rust 1.17.0 https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27
13 lines
294 B
Rust
13 lines
294 B
Rust
use std::env;
|
|
|
|
const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";
|
|
|
|
fn main() {
|
|
// If ASIO directory isn't set silently return early
|
|
// otherwise set the asio config flag
|
|
match env::var(CPAL_ASIO_DIR) {
|
|
Err(_) => return,
|
|
Ok(_) => println!("cargo:rustc-cfg=asio"),
|
|
};
|
|
}
|