fib decl one line
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2022-05-22 19:14:41 +01:00
parent 8f0b1a8083
commit 7bf1b6600d

View File

@ -5,8 +5,7 @@ fn main() {
}
fn fib(i: u64) -> u64 {
let mut a = 0;
let mut b = 1;
let (mut a, mut b) = (0, 1);
for _ in 0..i {
(a, b) = (b, a + b);