Skip to content

Commit c85d360

Browse files
committed
Fix mismatched-lifetime-syntaxes lint recently added to nightly
1 parent 224467c commit c85d360

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/utils/src/parser/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ pub trait Parser<'i>: Sized {
453453
/// assert_eq!(filtered, vec![22, 44]);
454454
/// # Ok::<(), InputError>(())
455455
/// ```
456-
fn parse_iterator(self, input: &str) -> ParserIterator<Self> {
456+
fn parse_iterator(self, input: &str) -> ParserIterator<'_, Self> {
457457
ParserIterator {
458458
input,
459459
remaining: input.as_bytes(),
@@ -477,7 +477,7 @@ pub trait Parser<'i>: Sized {
477477
/// vec![123, 456, 7, 8, 9]
478478
/// );
479479
/// ```
480-
fn matches_iterator(self, input: &str) -> ParserMatchesIterator<Self> {
480+
fn matches_iterator(self, input: &str) -> ParserMatchesIterator<'_, Self> {
481481
ParserMatchesIterator {
482482
remaining: input.as_bytes(),
483483
parser: self,

crates/year2015/src/day12.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ impl Day12 {
2424
self.part2
2525
}
2626

27-
fn parse(input: &[u8]) -> ParseResult<(i32, i32)> {
27+
fn parse(input: &[u8]) -> ParseResult<'_, (i32, i32)> {
2828
match input {
2929
[b'{', ..] => Self::parse_object(&input[1..]),
3030
[b'[', ..] => Self::parse_array(&input[1..]),
3131
_ => Err((ParseError::Expected("'{' or '['"), input)),
3232
}
3333
}
3434

35-
fn parse_object(mut input: &[u8]) -> ParseResult<(i32, i32)> {
35+
fn parse_object(mut input: &[u8]) -> ParseResult<'_, (i32, i32)> {
3636
let (mut part1, mut part2) = (0, 0);
3737
let mut red = false;
3838
loop {
@@ -66,7 +66,7 @@ impl Day12 {
6666
}
6767
}
6868

69-
fn parse_array(mut input: &[u8]) -> ParseResult<(i32, i32)> {
69+
fn parse_array(mut input: &[u8]) -> ParseResult<'_, (i32, i32)> {
7070
let (mut part1, mut part2) = (0, 0);
7171
loop {
7272
match input {

crates/year2017/src/day09.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Day09 {
1515
}
1616

1717
// Parses either a (nested) group or a single piece of garbage.
18-
fn parse(mut input: &[u8]) -> ParseResult<(u32, u32)> {
18+
fn parse(mut input: &[u8]) -> ParseResult<'_, (u32, u32)> {
1919
let mut group_depth = 0;
2020
let mut in_garbage = false;
2121

@@ -59,7 +59,7 @@ impl Day09 {
5959
}
6060
[b',', rest @ ..] if group_depth > 0 => rest,
6161
_ if group_depth > 0 => {
62-
return Err((ParseError::Custom("expected '{', '}', ',' or '<'"), input))
62+
return Err((ParseError::Custom("expected '{', '}', ',' or '<'"), input));
6363
}
6464
_ => return Err((ParseError::Custom("expected '{' or '<'"), input)),
6565
}

crates/year2017/src/day21.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Day21 {
9696
}
9797

9898
#[inline]
99-
fn parse_square<const N: usize>(mut input: &[u8]) -> ParseResult<usize> {
99+
fn parse_square<const N: usize>(mut input: &[u8]) -> ParseResult<'_, usize> {
100100
let mut result = 0;
101101
for row in 0..N {
102102
for col in 0..N {

0 commit comments

Comments
 (0)