File tree 6 files changed +9
-12
lines changed
6 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1
- #![ doc( html_logo_url = "https://maneatingape.github.io/advent-of-code-rust/logo.png" ) ]
2
- #![ allow( rustdoc:: private_intra_doc_links) ]
3
-
4
1
//! # Rust solutions to the annual Advent of Code challenge tuned for speed.
5
2
//!
6
3
//! [GitHub Repo](https://github.com/maneatingape/advent-of-code-rust)
7
4
5
+ // Configure rustdoc
6
+ #![ doc( html_logo_url = "https://maneatingape.github.io/advent-of-code-rust/logo.png" ) ]
7
+ #![ allow( rustdoc:: private_intra_doc_links) ]
8
+
8
9
/// # Utility modules to handle common recurring Advent of Code patterns.
9
10
pub mod util {
10
11
pub mod grid;
Original file line number Diff line number Diff line change 10
10
//! reason for the separate methods is that some AoC inputs contains the `-` character as a
11
11
//! delimeter and this would cause numbers to be incorrectly parsed as negative.
12
12
//!
13
- //! [`iter_unsigned`]: ParseUnsigned ::iter_unsigned
14
- //! [`iter_signed`]: ParseSigned ::iter_signed
13
+ //! [`iter_unsigned`]: ParseOps ::iter_unsigned
14
+ //! [`iter_signed`]: ParseOps ::iter_signed
15
15
use std:: marker:: PhantomData ;
16
16
use std:: ops:: { Add , Neg , Shl } ;
17
17
use std:: str:: Bytes ;
Original file line number Diff line number Diff line change 4
4
//! Since we don't care what order the highest values are returned in [`select_nth_unstable`] would
5
5
//! also work, and in theory is a little faster, however the difference was negligible when benchmarking.
6
6
//!
7
- //! Notes:
8
- //! * [`from`] is a convenience wrapper around [`parse`] that unwraps the number or panics if it can't be parsed.
9
- //!
10
7
//! [`select_nth_unstable`]: slice::select_nth_unstable
11
- //! [`parse`]: str::parse
12
8
use crate :: util:: parse:: * ;
13
9
14
10
/// Parse and group lines.
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type Pairs = [u32; 4];
27
27
/// * Extracting integers from redundant text is a very common theme in AoC that
28
28
/// the [`iter_unsigned`] method handles.
29
29
///
30
- /// [`iter_unsigned`]: ParseUnsigned ::iter_unsigned
30
+ /// [`iter_unsigned`]: ParseOps ::iter_unsigned
31
31
pub fn parse ( input : & str ) -> Vec < Pairs > {
32
32
input. iter_unsigned ( ) . chunk :: < 4 > ( ) . collect ( )
33
33
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type Input = (Stack, Vec<Move>);
26
26
/// at the end of the `vec` which is a more natural location for mutation (as removing elements from
27
27
/// the start of a `vec` involved moving all remaining elements).
28
28
///
29
- /// [`iter_unsigned`]: ParseUnsigned ::iter_unsigned
29
+ /// [`iter_unsigned`]: ParseOps ::iter_unsigned
30
30
/// [`chunk`]: ChunkOps::chunk
31
31
pub fn parse ( input : & str ) -> Input {
32
32
let ( prefix, suffix) = input. split_once ( "\n \n " ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 37
37
//! 8 % 5 = 3
38
38
//! ```
39
39
//!
40
- //! [`iter_unsigned`]: ParseUnsigned ::iter_unsigned
40
+ //! [`iter_unsigned`]: ParseOps ::iter_unsigned
41
41
use crate :: util:: parse:: * ;
42
42
43
43
#[ derive( Clone ) ]
You can’t perform that action at this time.
0 commit comments