diff options
author | Adam Carpenter <53hornet@gmail.com> | 2019-03-13 10:02:15 -0400 |
---|---|---|
committer | Adam Carpenter <53hornet@gmail.com> | 2019-03-13 10:02:15 -0400 |
commit | 8a4d2fb922c2c5a9e900b4b836d7787a09a1fe90 (patch) | |
tree | afb760597bf4cc78194892be910febde0209f7f3 /add/add-one/src | |
parent | b71e253b697bae079a0cf2526209334f4b81f9a5 (diff) | |
download | learning-rust-8a4d2fb922c2c5a9e900b4b836d7787a09a1fe90.tar.xz learning-rust-8a4d2fb922c2c5a9e900b4b836d7787a09a1fe90.zip |
Added concurrency, pointers, oop
Diffstat (limited to 'add/add-one/src')
-rw-r--r-- | add/add-one/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/add/add-one/src/lib.rs b/add/add-one/src/lib.rs new file mode 100644 index 0000000..fe3583e --- /dev/null +++ b/add/add-one/src/lib.rs @@ -0,0 +1,11 @@ +pub fn add_one(x: i32) -> i32 { + x + 1 +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +} |