Created
April 24, 2020 05:05
-
-
Save justinmoon/88e8108d047f5c74b666b01a42445a6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(all(target_os = "linux"))] | |
fn are_you_on_linux() { | |
println!("You are running linux!"); | |
} | |
#[cfg(not(target_os = "linux"))] | |
fn are_you_on_linux() { | |
println!("You are *not* running linux!"); | |
} | |
fn main() { | |
are_you_on_linux(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment