cargo init --lib

This commit is contained in:
Sebastian Kuzminsky 2025-07-03 08:42:20 -06:00 committed by Sebastian Kuzminsky
parent 63b2118ce7
commit b3a7ef3f14
3 changed files with 21 additions and 0 deletions

14
src/lib.rs Normal file
View file

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