Skip to content

Commit 056a067

Browse files
committed
Linting
1 parent fd4fa59 commit 056a067

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
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/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/year2020/day24.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//! a "pull" model where we check the surrounding neighbors of each tile, to a "push" model
1111
//! where we update the neighbors of each black tile instead.
1212
//!
13-
//! The SIMD alterative approach is much faster, processing 32 lanes at a time. As a further
14-
//! optimisation we skip rows and columns that the active state hasn't reached. The approach
13+
//! The SIMD alternative approach is much faster, processing 32 lanes at a time. As a further
14+
//! optimization we skip rows and columns that the active state hasn't reached. The approach
1515
//! is very similar to [`day 11`].
1616
//!
1717
//! [`day 17`]: crate::year2020::day17

src/year2023/day23.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
//! A row by row dynamic programming approach from top to bottom finds these paths. For each row
6464
//! we calculate all possible next rows. Interestingly it turns out that there are only 76 possible
6565
//! different rows. Then at each y coordinate we **deduplicate** rows to find the maximum value.
66-
//! This is the most important optimisation as it means that each row is at most 76 elements
66+
//! This is the most important optimization as it means that each row is at most 76 elements
6767
//! instead of growing exponentially (76², 76³, ...)
6868
//!
6969
//! ## Example paths

0 commit comments

Comments
 (0)