aboutsummaryrefslogtreecommitdiff
path: root/entries
diff options
context:
space:
mode:
authorDavid Ewert2022-10-24 23:01:26 +0000
committerGitHub2022-10-24 23:01:26 +0000
commitb707a7103789116363427bdd248007b61d527196 (patch)
treeb77161c63efd186d86c2508a554dec7f6bd141e8 /entries
parent0984f1f58d404016e93991b22e8f971a9bb00562 (diff)
>=
Diffstat (limited to 'entries')
-rw-r--r--entries/dewert99/fib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/entries/dewert99/fib.rs b/entries/dewert99/fib.rs
index b1744d5..ecf0a85 100644
--- a/entries/dewert99/fib.rs
+++ b/entries/dewert99/fib.rs
@@ -14,7 +14,7 @@ const fn fibc<const N: usize>() -> [u64; N] {
static FIB: [u64; MAX] = fibc();
pub fn fib(n: usize) -> Option<u64> {
- if n > MAX {
+ if n >= MAX {
None // Fib of n wouldn't fit in 64-bits
} else {
Some(FIB[n])