Fix compilation of main method when not on supported platform, works as library cross-platform now

This commit is contained in:
Travis Burtrum 2019-10-07 19:50:17 -04:00
parent 4554e19f28
commit 62501febb9

View File

@ -1,8 +1,13 @@
use rusty_keys::main_res;
#[cfg(any(target_os = "windows", target_os = "linux"))]
fn main() { fn main() {
let ret = main_res(); let ret = rusty_keys::main_res();
if let Err(e) = ret { if let Err(e) = ret {
println!("fatal error: {}", e); println!("fatal error: {}", e);
} }
} }
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
fn main() {
panic!("sorry no main impl for this platform");
}