mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-26 21:30:31 +01:00
Replace format("{}") with .to_string() where possible.
This commit is contained in:
@@ -138,7 +138,7 @@ impl Solution for Day20 {
|
||||
let pos = (0, 0);
|
||||
|
||||
self.follow_directions(&[pos], &data[1..]);
|
||||
format!("{}", self.distances().values().max().unwrap())
|
||||
self.distances().values().max().unwrap().to_string()
|
||||
}
|
||||
|
||||
fn part2(&mut self, input: &mut Read) -> String {
|
||||
@@ -147,7 +147,7 @@ impl Solution for Day20 {
|
||||
let pos = (0, 0);
|
||||
|
||||
self.follow_directions(&[pos], &data[1..]);
|
||||
format!("{}", self.distances().values().filter(|&&x| x >= 1000).count())
|
||||
self.distances().values().filter(|&&x| x >= 1000).count().to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user