mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-20 06:21:09 +02:00
Add return statements to the Fibonacci exercise. (#2576)
At this point in the course, we have not explained return statements. Better to have it set up to avoid questions!
This commit is contained in:
parent
536cdf378f
commit
3cca4735c4
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user