Created
April 24, 2018 04:47
-
-
Save rust-play/940e37766f46e69cff8852eb3ea0ff92 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or 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
fn log(msg: String) { | |
println!("{}", msg); | |
} | |
fn main() { | |
let s = String::from("this is a log message"); | |
log(s); | |
println!("length is {}", s.len()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment