feat: added pub fn sub()
Release-plz / Release-plz release (push) Successful in 1m27s
Release-plz / Release-plz PR (push) Failing after 1m34s

This takes in two u64, and returns the difference.

TESTING WORKFLOWS
This commit is contained in:
2026-09-10 20:18:36 -05:00
parent 77cfc8bed9
commit bb37eb9d94
+6
View File
@@ -2,6 +2,10 @@ pub fn add(left: u64, right: u64) -> u64 {
left + right
}
pub fn sub(left: u64, right: u64) -> u64 {
left - right
}
#[cfg(test)]
mod tests {
use super::*;
@@ -10,5 +14,7 @@ mod tests {
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
let result = sub(2, 2);
assert_eq!(result, 0);
}
}