Skip to content

Commit ca41795

Browse files
committed
Linting
1 parent fd6b8e5 commit ca41795

File tree

35 files changed

+56
-56
lines changed

35 files changed

+56
-56
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Your contribution should generally fall into one of the following two categories
1212
* 🪲 **Bug Fix** Solutions try to be as general as possible but can't test for every input.
1313
Your pull request fixes an incorrect answer for your input or prevents a panic.
1414
* 🚀 **Performance Improvement** Your pull request gives a significant performance
15-
improvement. This could be achieved by using a better algorithm, better low level optimizations,
15+
improvement. This could be achieved by using a better algorithm, better low-level optimizations,
1616
by applying the portable SIMD library or by any other means!
1717

1818
## Legal Notice

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ library!(year2019 "Rescue Santa from deep space with a solar system voyage."
4848
day14, day15, day16, day17, day18, day19, day20, day21, day22, day23, day24, day25, intcode
4949
);
5050

51-
library!(year2020 "What could go wrong trying to enjoy a well deserved vacation?"
51+
library!(year2020 "What could go wrong trying to enjoy a well-deserved vacation?"
5252
day01, day02, day03, day04, day05, day06, day07, day08, day09, day10, day11, day12, day13,
5353
day14, day15, day16, day17, day18, day19, day20, day21, day22, day23, day24, day25
5454
);

src/util/grid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Fast 2 dimensional Grid backed by a single `vec`. This module is designed to work with [`Point`].
1+
//! Fast 2-dimensional Grid backed by a single `vec`. This module is designed to work with [`Point`].
22
//!
33
//! The traits [`Index`] and [`IndexMut`] are implemented for [`Point`] to allow usage like:
44
//!
@@ -16,7 +16,7 @@
1616
//! assert_eq!(grid[point], b'2');
1717
//! ```
1818
//!
19-
//! A convenience [`parse`] method creates a `Grid` directly from a 2 dimensional set of
19+
//! A convenience [`parse`] method creates a `Grid` directly from a 2-dimensional set of
2020
//! ASCII characters, a common occurrence in Advent of Code inputs. The [`same_size_with`] function
2121
//! creates a grid of the same size that can be used in BFS algorithms for tracking visited
2222
//! locations or for tracking cost in Dijkstra.

src/util/point.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Comprehensive 2 dimensional point implementation. This class is designed to work together
1+
//! Comprehensive 2-dimensional point implementation. This class is designed to work together
22
//! with the [`Grid`] class.
33
//!
44
//! A common theme in Advent of Code is operations in 2 dimensions. This module provides a

src/year2016/day11.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Floor {
6868
self.generators() >= other.generators() && self.microchips() >= other.microchips()
6969
}
7070

71-
// Criticial optimization treating generators and microchips as fungible.
71+
// Critical optimization treating generators and microchips as fungible.
7272
#[inline]
7373
fn valid(self) -> bool {
7474
self.generators() == 0 || self.generators() >= self.microchips()

src/year2017/day07.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn parse(input: &str) -> Input<'_> {
8888
}
8989
}
9090

91-
// Total is a nodes weight plus the sum of all children recursively.
91+
// Total is a node's weight plus the sum of all children recursively.
9292
node.total += total;
9393
node.processed += 1;
9494

src/year2017/day10.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! # Knot Hash
22
//!
33
//! Instead of reversing elements from the starting position then trying to handle wrap around,
4-
//! its easier use [`rotate_left`] to rotate the array by the same amount so that the starting
5-
//! position is always zero, then take advantage of the built in [`reverse`] method.
4+
//! it's easier to use [`rotate_left`] to rotate the array by the same amount so that the starting
5+
//! position is always zero, then take advantage of the built-in [`reverse`] method.
66
//!
77
//! [`rotate_left`]: slice::rotate_left
88
//! [`reverse`]: slice::reverse

src/year2017/day25.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! # The Halting Problem
22
//!
3-
//! The input is parsed into a 2 dimensional array covering each possible combination of state
3+
//! The input is parsed into a 2-dimensional array covering each possible combination of state
44
//! and tape value at the cursor. Each transition is then computed via a lookup into this array.
55
//!
66
//! To speed things up by about ten times, multiple transitions are then precomputed to allow

src/year2018/day18.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! # Settlers of The North Pole
22
//!
3-
//! This problem is a cellular automaton similar to the well known
3+
//! This problem is a cellular automaton similar to the well-known
44
//! [Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). To solve part two
55
//! we look for a [cycle](https://en.wikipedia.org/wiki/Cycle_detection) then
66
//! extrapolate forward a billion generations.

src/year2018/day22.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! # Mode Maze
22
//!
3-
//! Our high level approach is an [A*](https://en.wikipedia.org/wiki/A*_search_algorithm) search.
3+
//! Our high-level approach is an [A*](https://en.wikipedia.org/wiki/A*_search_algorithm) search.
44
//! This [fantastic blog](https://www.redblobgames.com/pathfinding/a-star/introduction.html)
55
//! is a great introduction to this algorithm. The heuristic is the
66
//! [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry) to the target. This will

0 commit comments

Comments
 (0)