Files
100-exercises-to-learn-rust/exercises/02_basic_calculator/01_integers/src/lib.rs
2024-05-12 22:47:45 +02:00

15 lines
265 B
Rust

fn compute(a: u32, b: u32) -> u32 {
// TODO: change the line below to fix the compiler error and make the tests pass.
a + b * 4u8
}
#[cfg(test)]
mod tests {
use crate::compute;
#[test]
fn case() {
assert_eq!(compute(1, 2), 9);
}
}