arnaucube
arnaucube/protogalaxy-pocPublic Self-hosted repository
init repo
arnaucube root@arnaucube.com
Thu, 27 Jul 2023 21:08:37 +0200
commit

a4c84c60261d916971af575238951b1280b4c06d

3 files changed, 24 insertions(+), 0 deletions(-)

jump to
A .gitignore

@@ -0,0 +1,2 @@

+/target +/Cargo.lock
A Cargo.toml

@@ -0,0 +1,8 @@

+[package] +name = "protogalaxy" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies]
A src/lib.rs

@@ -0,0 +1,14 @@

+pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}