Advent of Code solutions in Rust

chore: fix new mismatched-lifetime-syntaxes rustc warnings #2

closed opened by jonas.tngl.sh targeting main from jg/kznwxxuomyty
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:bgslv45eubr4gvkfwjd5kv7s/sh.tangled.repo.pull/3m63rd6wvlr22
+3 -3
Diff #0
+1 -1
aoc_2017/src/day08.rs
··· 104 104 RegistersEmpty, 105 105 } 106 106 107 - fn parse_input(input: &str) -> Result<Vec<Instruction>, ParseError> { 107 + fn parse_input(input: &str) -> Result<Vec<Instruction<'_>>, ParseError> { 108 108 let re = regex::Regex::new(r"^(?P<target>[a-z]+) (?P<op>inc|dec) (?P<amount>-?[0-9]+) if (?P<register>[a-z]+) (?P<cmp><|>|<=|>=|==|!=) (?P<value>-?[0-9]+)$").unwrap(); 109 109 110 110 input
+2 -2
aoc_2020/src/day03.rs
··· 47 47 } 48 48 49 49 trait SlopeIterable { 50 - fn slope_iter(&self, slope: Slope) -> SlopeIter; 50 + fn slope_iter(&self, slope: Slope) -> SlopeIter<'_>; 51 51 } 52 52 53 53 impl SlopeIterable for Map { 54 - fn slope_iter(&self, slope: Slope) -> SlopeIter { 54 + fn slope_iter(&self, slope: Slope) -> SlopeIter<'_> { 55 55 SlopeIter { 56 56 game_board: self, 57 57 row_iter: Box::new((0..self.nrows()).step_by(slope.down)),

History

1 round 0 comments
sign up or login to add to the discussion
jonas.tngl.sh submitted #0
1 commit
expand
chore: fix new mismatched-lifetime-syntaxes rustc warnings
expand 0 comments
closed without merging