1
0
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:
andriyDev 2025-01-21 08:15:13 -08:00 committed by GitHub
parent 536cdf378f
commit 3cca4735c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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");
}
}