Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 29, 2024
1 parent 55f32f0 commit 4ee70b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust/src/p0035.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Iterator for Rotations {

fn next(&mut self) -> Option<Self::Item> {
if self.i < self.x.len() {
let result = (format!("{self.x[self.i..]}{self.x[..self.i]}")).parse::<u64>().unwrap();
let result = format!("{}{}", self.x[self.i..], self.x[..self.i]).parse::<u64>().unwrap();
self.i += 1;
return Some(result);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/src/p0041.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn p0041() -> Answer {
if num_digits > 7 {
break;
}
if cur_digits.bytes().any(|b| ((b - b'0').into() > num_digits || cur_digits.bytes().filter(|c| *c == b).count() != 1)) {
if cur_digits.bytes().any(|b| ((b - b'0') as usize > num_digits || cur_digits.bytes().filter(|c| *c == b).count() != 1)) {
continue;
}
if p > answer {
Expand Down

0 comments on commit 4ee70b1

Please sign in to comment.