diff --git a/rust/src/p0034.rs b/rust/src/p0034.rs index 23546954..26ec03b0 100644 --- a/rust/src/p0034.rs +++ b/rust/src/p0034.rs @@ -21,7 +21,7 @@ pub fn p0034() -> i128 { for x in 10..100000 { let sum = x.to_string() .bytes() - .fold(0, |a, b| a + factorial::(b - '0'.into::())); + .fold(0, |a, b| a + factorial::(b - u8::from('0'))); if sum == x { answer += x; }