diff options
Diffstat (limited to 'semiring/src/lib.rs')
-rw-r--r-- | semiring/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/semiring/src/lib.rs b/semiring/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/semiring/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); + } +} |