Fix example in docs on documentation
This commit is contained in:
parent
89259b34c0
commit
c85d42a305
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ Calculates the factorial of a number.
|
|||
|
||||
Given the input integer `n`, this function will calculate `n!` and return it.
|
||||
"]
|
||||
pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n)} }
|
||||
pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n - 1)} }
|
||||
# fn main() {}
|
||||
~~~
|
||||
|
||||
|
|
Loading…
Reference in a new issue