Add compile time feature compatibility check, remove from build.rs
This commit is contained in:
parent
270362b152
commit
956c428251
7
build.rs
7
build.rs
@ -1,7 +0,0 @@
|
||||
fn main() {
|
||||
// Must enable rcon on Windows
|
||||
#[cfg(all(windows, not(feature = "rcon")))]
|
||||
{
|
||||
println!("cargo:warning=lazymc: you must enable rcon feature on Windows");
|
||||
}
|
||||
}
|
@ -31,6 +31,10 @@ use std::env;
|
||||
|
||||
use clap::App;
|
||||
|
||||
// Compile time feature compatability check.
|
||||
#[cfg(all(windows, not(feature = "rcon")))]
|
||||
compile_error!("Must enable \"rcon\" feature on Windows.");
|
||||
|
||||
/// Default log level if none is set.
|
||||
const LOG_DEFAULT: &str = "info";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user