Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BobGneu/f4a374dba81315af81204962de559da0 to your computer and use it in GitHub Desktop.
Save BobGneu/f4a374dba81315af81204962de559da0 to your computer and use it in GitHub Desktop.
//! ## 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