From 666a544da08a64077f78e9c6320c609f65d134ea Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Thu, 18 Jul 2024 01:33:13 -0500 Subject: [PATCH] Fix type error --- rust/src/p0008.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/p0008.rs b/rust/src/p0008.rs index c8759441..ef9902b3 100644 --- a/rust/src/p0008.rs +++ b/rust/src/p0008.rs @@ -63,7 +63,7 @@ pub fn p0008() -> i128 { let slice = &string[i..(i + 13)]; let mut prod: u64 = 1; for c in slice.bytes() { - prod *= c as u32 - '0' as u32; + prod *= (c as u32 - '0' as u32) as u64; } if prod > answer { answer = prod;