Skip to content

Commit 7b46cc4

Browse files
committed
Linting
1 parent fd4fa59 commit 7b46cc4

File tree

15 files changed

+21
-21
lines changed

15 files changed

+21
-21
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
I hope that you've enjoyed reading these solutions as much as I enjoyed writing them.
44
They're pretty fast and clean...but can you make them even *faster and cleaner*?
55

6-
If you've made an improvement then please
6+
If you've made an improvement, then please
77
[open a pull request](https://github.com/maneatingape/advent-of-code-rust/compare).
88
Contributions are encouraged and valued. ❤️
99

src/util/grid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
//!
1919
//! 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
21-
//! 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 Dijkstra.
21+
//! creates a grid of the same size that can be used in BFS algorithms for tracking visited
22+
//! locations or for tracking cost in Dijkstra.
2323
//!
2424
//! [`Point`]: crate::util::point
2525
//! [`parse`]: Grid::parse

src/util/math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//!
77
//! * [Least common multiple](https://en.wikipedia.org/wiki/Least_common_multiple)
88
//!
9-
//! * [Modular exponentation](https://en.wikipedia.org/wiki/Modular_exponentiation).
9+
//! * [Modular exponentiation](https://en.wikipedia.org/wiki/Modular_exponentiation).
1010
//! Calculates bᵉ mod m efficiently using
1111
//! [exponentiation by squaring](https://en.wikipedia.org/wiki/Exponentiation_by_squaring).
1212
//!

src/util/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//! ```
99
//!
1010
//! This module provides two [`&str`] extension methods [`iter_signed`] and [`iter_unsigned`]. The
11-
//! reason for the separate methods is that some Advent of Code inputs contains the `-` character
12-
//! as a delimeter and this would cause numbers to be incorrectly parsed as negative.
11+
//! reason for the separate methods is that some Advent of Code inputs contain the `-` character
12+
//! as a delimiter and this would cause numbers to be incorrectly parsed as negative.
1313
//!
1414
//! [`iter_unsigned`]: ParseOps::iter_unsigned
1515
//! [`iter_signed`]: ParseOps::iter_signed

src/util/thread.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Utility methods to spawn a number of
22
//! [scoped](https://doc.rust-lang.org/stable/std/thread/fn.scope.html)
3-
//! threads equals to the number of cores on the machine. Unlike normal threads, scoped threads
3+
//! threads equal to the number of cores on the machine. Unlike normal threads, scoped threads
44
//! can borrow data from their environment.
55
use std::sync::atomic::{AtomicBool, AtomicU32, AtomicUsize, Ordering::Relaxed};
66
use std::thread::*;
@@ -31,7 +31,7 @@ where
3131
/// Spawns `n` scoped threads that each receive a
3232
/// [work stealing](https://en.wikipedia.org/wiki/Work_stealing) iterator.
3333
/// Work stealing is an efficient strategy that keeps each CPU core busy when some items take longer
34-
/// than other to process, used by popular libraries such as [rayon](https://github.com/rayon-rs/rayon).
34+
/// than others to process, used by popular libraries such as [rayon](https://github.com/rayon-rs/rayon).
3535
/// Processing at different rates also happens on many modern CPUs with
3636
/// [heterogeneous performance and efficiency cores](https://en.wikipedia.org/wiki/ARM_big.LITTLE).
3737
pub fn spawn_parallel_iterator<F, R, T>(items: &[T], f: F) -> Vec<R>

src/year2015/day23.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! [3n + 1 sequence](https://en.wikipedia.org/wiki/Collatz_conjecture)
55
//! for one of two different numbers chosen depending on whether `a` is 0 or 1.
66
//!
7-
//! The code fast enough to emulate directly without needing any understanding of what it's doing.
7+
//! The code is fast enough to emulate directly without needing any understanding of what it's doing.
88
use crate::util::parse::*;
99

1010
pub enum Op {

src/year2016/day24.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! searches starting from each location.
1010
//!
1111
//! For speed we convert each location into an index, then store the distances between
12-
//! every pair of locations in an vec for fast lookup. Our utility [`permutations`] method uses
12+
//! every pair of locations in a vec for fast lookup. Our utility [`permutations`] method uses
1313
//! [Heap's algorithm](https://en.wikipedia.org/wiki/Heap%27s_algorithm) for efficiency,
1414
//! modifying the slice in place.
1515
//!

src/year2019/day16.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
//! We could compute the coefficient using the formula `nᵏ/k!` however this [grows rather large]
6464
//! and quickly will overflow even a `u128`.
6565
//!
66-
//! However we only need to coefficient modulo 10. [Lucas's theorem] allow us to computer binomial
66+
//! However we only need the coefficient modulo 10. [Lucas's theorem] allows us to compute binomial
6767
//! coefficients modulo some prime number. If we compute the coefficients modulo 2 and modulo 5
6868
//! then we can use the [Chinese remainder theorem] to find the result modulo 10.
6969
//!

src/year2019/day25.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ fn drain_output(computer: &mut Computer) {
244244
while let State::Output(_) = computer.run() {}
245245
}
246246

247-
// Convert an normal binary number to its Gray Code equivalent
247+
// Convert a normal binary number to its Gray Code equivalent.
248248
fn gray_code(n: u32) -> u32 {
249249
n ^ (n >> 1)
250250
}

src/year2020/day07.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! # Handy Haversacks
22
//!
3-
//! A hashtable would be a natural data structure for this problem but is a little slow.
4-
//! To make things faster we implement the hashtable using an array and a combination of three
3+
//! A hash table would be a natural data structure for this problem but is a little slow.
4+
//! To make things faster we implement the hash table using an array and a combination of three
55
//! [perfect hash functions](https://en.wikipedia.org/wiki/Perfect_hash_function) that map from
66
//! each combination of bag descriptions to a unique index.
77
//!

0 commit comments

Comments
 (0)