()
| 1 | fn main() { |
| 2 | let fizz_buzz = |x| { |
| 3 | if x % 15 == 0 { |
| 4 | println!("FizzBuzz") |
| 5 | } else if x % 3 == 0 { |
| 6 | println!("Fizz") |
| 7 | } else if x % 5 == 0 { |
| 8 | println!("Buzz") |
| 9 | } else { |
| 10 | println!("{}", x) |
| 11 | } |
| 12 | }; |
| 13 | for i in 1..16 { |
| 14 | fizz_buzz(i) |
| 15 | } |
| 16 | println!("---"); |
| 17 | (1..16).into_iter().for_each(fizz_buzz); |
| 18 | } |
nothing calls this directly
no test coverage detected