Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created April 25, 2017 21:26
Show Gist options
  • Save marti1125/64fba60dc43f7f0e87f7644c6da27853 to your computer and use it in GitHub Desktop.
Save marti1125/64fba60dc43f7f0e87f7644c6da27853 to your computer and use it in GitHub Desktop.
rust doc
fn main() {
let r: i32 = sum(4,5);
println!("{:?}", r);
println!("Hello, world!");
}
/// # Examples
///
/// ```
/// let r: i32 = sum(4,5);
/// println!("{:?}", r);
/// 9
/// ```
pub fn sum(a: i32, b: i32) -> i32 {
a + b
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment