Skip to content

Commit

Permalink
Change type of c
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 18, 2024
1 parent 71b428e commit a4aefd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/p0008.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ pub fn p0008() -> u64 {
for i in 0..(string.len() - 13) {
let slice = &string[i..(i + 13)];
let mut prod: u64 = 1;
for c in slice.bytes() {
prod *= (c - '0' as u8) as u64;
for c in slice.chars() {
prod *= (c - '0') as u64;

Check failure

Code scanning / clippy

cannot subtract char from char Error

cannot subtract char from char

Check failure

Code scanning / clippy

cannot subtract char from char Error

cannot subtract char from char

Check failure

Code scanning / clippy

cannot subtract char from char Error

cannot subtract char from char
}
if prod > answer {
answer = prod;
Expand Down

0 comments on commit a4aefd3

Please sign in to comment.