Skip to main content

thejpster_test_docs_target/
lib.rs

1//! This is a test project, you should ignore it.
2//! 
3//! It exists to check if docs.rs can build packages with no-std targets
4//! specified.
5
6#![no_std]
7
8/// This is a function that adds two numbers.
9pub fn add(left: u64, right: u64) -> u64 {
10    left + right
11}
12
13#[cfg(test)]
14mod tests {
15    use super::*;
16
17    #[test]
18    fn it_works() {
19        let result = add(2, 2);
20        assert_eq!(result, 4);
21    }
22}