Updated math lib and import in cargo toml file

This commit is contained in:
2020-08-20 16:02:30 +07:00
parent 0ae0b214bc
commit cc6b0c38db
5 changed files with 17 additions and 8 deletions

View File

@@ -1,8 +1,6 @@
mod math {
#[allow(dead_code)]
pub fn sum(a: i32, b: i32) -> i32 {
a + b
}
#[allow(dead_code)]
pub fn sum(a: i32, b: i32) -> i32 {
a + b
}
#[cfg(test)]
@@ -11,6 +9,6 @@ mod tests {
#[test]
fn it_works() {
assert_eq!(math::sum(10, 10), 20);
assert_eq!(sum(10, 10), 20);
}
}