Created
January 24, 2020 15:26
-
-
Save rust-play/05cedab0df80a553832dea9a4ed596e6 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
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
#![allow(unused)] | |
fn main() { | |
/// Adds one to the number given. | |
/// | |
/// # Examples | |
/// | |
/// ``` | |
/// let five = 5; | |
/// | |
/// assert_eq!(6, my_crate::add_one(5)); | |
/// ``` | |
pub fn add_one(x: i32) -> i32 { | |
x + 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment