used for small num a: a!
(n: usize)
| 21 | |
| 22 | /// used for small num a: a! |
| 23 | pub fn factorial(n: usize) -> usize { |
| 24 | match n { |
| 25 | 0 | 1 => 1, |
| 26 | _ => n * Self::factorial(n - 1), |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | #[cfg(test)] |
nothing calls this directly
no outgoing calls
no test coverage detected