Browse Source

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

macdev
Travis Burtrum 4 years ago
parent
commit
62501febb9
  1. 9
      src/main.rs

9
src/main.rs

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

Loading…
Cancel
Save