File tree Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Expand file tree Collapse file tree 4 files changed +2
-20
lines changed Original file line number Diff line number Diff line change 5
5
My solutions for Advent of Code 2023. Written in Rust 🦀.
6
6
7
7
- Clone the repository.
8
- - Make sure you have a nightly version of Rust around December 2023 .
8
+ - Make sure you have a nightly version of Rust around January 2024 .
9
9
- ` cargo run --release ` for all days, ` cargo run --release -- NN ` for a specific
10
10
day.
11
11
- Want your own inputs?
Original file line number Diff line number Diff line change 1
1
#![ feature( array_windows) ]
2
2
#![ feature( auto_traits) ]
3
3
#![ feature( decl_macro) ]
4
- #![ feature( entry_insert) ]
5
4
#![ feature( hash_raw_entry) ]
6
5
#![ feature( let_chains) ]
7
6
#![ feature( maybe_uninit_array_assume_init) ]
8
7
#![ feature( maybe_uninit_uninit_array) ]
9
8
#![ feature( negative_impls) ]
10
9
#![ feature( non_null_convenience) ]
11
10
#![ feature( slice_split_at_unchecked) ]
12
- #![ feature( split_array) ]
13
- #![ feature( stmt_expr_attributes) ]
14
11
#![ feature( trait_alias) ]
15
12
#![ feature( trusted_len) ]
16
13
Original file line number Diff line number Diff line change @@ -105,11 +105,7 @@ impl<'s, const N: usize> Parser<'s> for TakeN<N> {
105
105
type Output = & ' s [ u8 ; N ] ;
106
106
107
107
fn parse ( & self , input : & ' s [ u8 ] ) -> ParseResult < ' s , Self :: Output > {
108
- if input. len ( ) < N {
109
- Err ( ( ParseError :: EmptyInput , input) )
110
- } else {
111
- Ok ( input. split_array_ref ( ) )
112
- }
108
+ input. split_first_chunk ( ) . ok_or ( ( ParseError :: EmptyInput , input) )
113
109
}
114
110
}
115
111
Original file line number Diff line number Diff line change 1
1
#![ feature( array_chunks) ]
2
- #![ feature( array_windows) ]
3
- #![ feature( box_into_inner) ]
4
2
#![ feature( byte_slice_trim_ascii) ]
5
3
#![ feature( coroutines) ]
6
- #![ feature( decl_macro) ]
7
- #![ feature( generic_const_exprs) ]
8
- #![ feature( get_many_mut) ]
9
4
#![ feature( hash_raw_entry) ]
10
5
#![ feature( iter_from_coroutine) ]
11
6
#![ feature( iter_repeat_n) ]
12
- #![ feature( let_chains) ]
13
7
#![ feature( map_try_insert) ]
14
- #![ feature( never_type) ]
15
8
#![ feature( slice_partition_dedup) ]
16
- #![ feature( slice_take) ]
17
- #![ feature( stmt_expr_attributes) ]
18
-
19
- #![ allow( incomplete_features) ]
20
9
21
10
#![ feature( custom_test_frameworks) ]
22
11
#![ cfg_attr( feature = "criterion" , test_runner( criterion:: runner) ) ]
You can’t perform that action at this time.
0 commit comments