Template
Lint & Build / Linting (push) Successful in 1m23s
Lint & Build / Build (push) Successful in 1m1s
Lint & Build / Test (push) Successful in 1m35s
Lint & Build / Cross-Build-Windows (push) Successful in 2m6s
Lint & Build / Cross-Build-Linux (push) Successful in 2m12s
Lint & Build / Cross-Build-MacOS (push) Successful in 2m48s
This Pull Request will setup the process of Automatic release of everything in the workspace. Adds in a README.md file. --------- Co-authored-by: ci-bot <bot@email.melfely.com> Reviewed-on: #6 Co-authored-by: Melfely <bug362@outlook.com>
21 lines
336 B
Rust
21 lines
336 B
Rust
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::*;
|
|
|
|
#[test]
|
|
fn it_works() {
|
|
let result = add(2, 2);
|
|
assert_eq!(result, 4);
|
|
let result = sub(2, 2);
|
|
assert_eq!(result, 0);
|
|
}
|
|
}
|