(n: i32)
| 1 | pub fn is_three(n: i32) -> bool { |
| 2 | if n < 3 { |
| 3 | return false; |
| 4 | } |
| 5 | let mut count = 0; |
| 6 | for i in 2..n { |
| 7 | if n % i == 0 { |
| 8 | count += 1; |
| 9 | } |
| 10 | if count > 1 { |
| 11 | return false; |
| 12 | } |
| 13 | } |
| 14 | count == 1 |
| 15 | } |
| 16 | |
| 17 | fn main() { |
| 18 | println!("{:?}", is_three(4)); |
nothing calls this directly
no outgoing calls
no test coverage detected