Created
March 21, 2018 17:29
-
-
Save BobGneu/f4a374dba81315af81204962de559da0 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
//! ## Documentation Example | |
//! | |
//! This is a lot of great documentation, you ought to read and maintain this. | |
//! | |
//! Somehow i think, you are going to not do that. | |
//! | |
//! ```rust | |
//! use documentation_test::meaning_of_life; | |
//! | |
//! fn it_works() { | |
//! assert_eq!(42, meaning_of_life(4)); | |
//! } | |
//! | |
//! it_works(); | |
//! ``` | |
pub fn meaning_of_life(_multiplier: i64) -> i64 { | |
return 42; | |
} | |
#[cfg(test)] | |
mod tests { | |
use super::*; | |
#[test] | |
fn it_works() { | |
assert_eq!(42, meaning_of_life(4)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment