Challenge 1: Testing subtract — Possible Solution ==================================================================== pub fn subtract(a: i32, b: i32) -> i32 { a - b } #[cfg(test)] mod tests { use super::*; #[test] fn it_subtracts_two_numbers() { assert_eq!(subtract(10, 3), 7); } #[test] fn subtracting_a_number_from_itself_is_zero() { assert_eq!(subtract(5, 5), 0); } } WHY THIS WORKS AS AN ANSWER ------------------------------ The tests module is marked #[cfg(test)], meaning it only compiles during test runs and never bloats a normal build — this chapter's own core convention for organizing unit tests, and directly avoids the warn-box's forgetting-#[cfg(test)] gotcha. use super::* brings subtract (defined in the parent module) into scope inside tests — necessary since subtract is otherwise only visible in the module it was actually defined in. Two separate #[test] functions cover two genuinely different cases: a normal subtraction (10 - 3 = 7) and the specific edge case of subtracting a number from itself, which should always yield zero regardless of the number's actual value — a small but real edge case worth its own explicit test, similar in spirit to how earlier chapters treated zero/edge-case inputs as worth testing separately from the "typical" case.