People love to repeat that in Rust "if it compiles, it works". The compiler does kill a whole class of bugs, but it doesn't check your logic. A wrong discount calculation compiles just fine.
Source: [Dev.to](https://dev.to/nerjs/testing-in-rust-from-cargo-test-to-mocking-http-calls-1lpg)