Skip to content

Commit

Permalink
Add return statements to the Fibonacci exercise. (#2576)
Browse files Browse the repository at this point in the history
At this point in the course, we have not explained return statements.
Better to have it set up to avoid questions!
  • Loading branch information
andriyDev authored Jan 21, 2025
1 parent 536cdf3 commit 3cca473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types-and-values/exercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ this function panic?
{{#include exercise.rs:fib}}
if n < 2 {
// The base case.
todo!("Implement this")
return todo!("Implement this");
} else {
// The recursive case.
todo!("Implement this")
return todo!("Implement this");
}
}
Expand Down

0 comments on commit 3cca473

Please sign in to comment.