Skip to content

Commit b430535

Browse files
committed
Tidy comments
1 parent be8d177 commit b430535

File tree

22 files changed

+33
-33
lines changed

22 files changed

+33
-33
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It should generally fall into one of the following two categories:
2020

2121
When contributing to this project, you must agree that you have authored 100% of the content,
2222
that you have the necessary rights to the content and that the content you contribute
23-
may be provided under the project licence.
23+
may be provided under the project license.
2424

2525
## Guidelines
2626

src/util/grid.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
//! assert_eq!(grid[point], b'2');
1717
//! ```
1818
//!
19-
//! A convenience [`parse`] method creates a `Grid` directly from a 2 dimenionsal set of
20-
//! ASCII characters, a common occurence in Advent of Code inputs. The [`same_size_with`] function
19+
//! A convenience [`parse`] method creates a `Grid` directly from a 2 dimensional set of
20+
//! 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 for in BFS algorithms for tracking visited
22-
//! location or for tracking cost in Djikstra.
22+
//! location or for tracking cost in Dijkstra.
2323
//!
2424
//! [`Point`]: crate::util::point
2525
//! [`parse`]: Grid::parse

src/year2016/day16.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
//!
3333
//! Now for the really neat part. We can recursively find the number of ones in `y` by repeating
3434
//! the same process by setting the new `length` to `next`. We keep recursing until the length
35-
//! is less the size of the inital input and we can lookup the final count from the prefix sum.
35+
//! is less the size of the initial input and we can lookup the final count from the prefix sum.
3636
use crate::util::parse::*;
3737

3838
/// Build a prefix sum of the number of ones at each length in the pattern

src/year2017/day03.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! ------------>
2020
//! ```
2121
//!
22-
//! The first component is the horizonal or vertical distance from the centre to the ring,
22+
//! The first component is the horizontal or vertical distance from the centre to the ring,
2323
//! in this case 2 steps. The second component is the distance from the target number to the
2424
//! center of each edge, in this case 2 - 1 = 1.
2525
//!

src/year2018/day09.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
//! ```
3535
//!
3636
//! Things start to get interesting at the 19th marble. When we pick the 23rd marble this will
37-
//! be 7 places counter clockwise, so we can optimize by not adding it at all the the circle.
37+
//! be 7 places counter clockwise, so we can optimize by not adding it at all to the circle.
3838
//! Instead we save the value for later.
3939
//!
4040
//! ```none

src/year2018/day16.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn part2(input: &Input) -> usize {
7474

7575
while let Some(index) = masks.iter().position(|m| m.count_ones() == 1) {
7676
let mask = masks[index];
77-
// This opcode has only 1 possible mapping, so remove possbility from other opcodes.
77+
// This opcode has only 1 possible mapping, so remove possibility from other opcodes.
7878
masks.iter_mut().for_each(|m| *m &= !mask);
7979
// Add mapping.
8080
convert[index] = mask.trailing_zeros() as usize;

src/year2019/day13.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn part2(input: &[i64]) -> i64 {
9292
}
9393

9494
// Non essential but hilarious. Enable feature then run program in a command line
95-
// conosle to observe an animated game of breakout.
95+
// console to observe an animated game of breakout.
9696
#[cfg(feature = "frivolity")]
9797
draw(&tiles, stride, score, blocks);
9898
}

src/year2019/day17.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn segments(path: &str) -> impl Iterator<Item = (&str, &str)> {
214214

215215
#[cfg(not(feature = "frivolity"))]
216216
fn visit(mut computer: Computer) -> i64 {
217-
// Disable continous video feed
217+
// Disable continuous video feed
218218
computer.input_ascii("n\n");
219219

220220
let mut result = 0;
@@ -235,7 +235,7 @@ fn visit(mut computer: Computer) -> i64 {
235235
let mut previous = ' ';
236236
let mut buffer = String::new();
237237

238-
// Enable continous video feed
238+
// Enable continuous video feed
239239
computer.input_ascii("y\n");
240240

241241
while let State::Output(next) = computer.run() {

src/year2019/day24.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! For example the bitmask for position `a` is `100010` and for position `h` is `1000101000100`.
2020
//!
2121
//! For each generation we bitwise `AND` each position with its mask, then use the [`count_ones`]
22-
//! intrinsic to to efficiently find the number of neighbors.
22+
//! intrinsic to efficiently find the number of neighbors.
2323
//!
2424
//! ## Part Two
2525
//!

src/year2020/day20.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! ## Part One
1616
//!
1717
//! First we calculate the frequency of each edge, both forwards and backwards as tiles can be in
18-
//! any orientation. As there only 2¹⁰ or 1024 possible edge values we can use an array intead of a
18+
//! any orientation. As there only 2¹⁰ or 1024 possible edge values we can use an array instead of a
1919
//! hashtable for speed, converting the edges into a binary number to index the array.
2020
//!
2121
//! This results in 96 values that occur once and 528 values that occur twice. Then for every tile

0 commit comments

Comments
 (0)