Skip to content

Commit

Permalink
[2021] Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Jan 8, 2024
1 parent 9d02840 commit 1c923af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions aoc_2021/src/day_12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Solution for Day12 {
}
}

fn paths_a<'a>(graph: &ParseResult<'a>, at: NodeIndex, mut visited: HashSet<NodeIndex>) -> usize {
fn paths_a(graph: &ParseResult, at: NodeIndex, mut visited: HashSet<NodeIndex>) -> usize {
if at == graph.end {
return 1;
}
Expand All @@ -31,7 +31,6 @@ fn paths_a<'a>(graph: &ParseResult<'a>, at: NodeIndex, mut visited: HashSet<Node
graph
.graph
.neighbors(at)
.into_iter()
.map(|child| paths_a(graph, child, visited.clone()))
.sum()
}
Expand All @@ -54,7 +53,7 @@ struct ParseResult<'a> {
end: NodeIndex,
}

fn parse<'a>(input: &'a str) -> ParseResult<'a> {
fn parse(input: &str) -> ParseResult {
let mut graph = UnGraph::new_undirected();
let mut nodes = HashMap::new();

Expand Down
4 changes: 1 addition & 3 deletions aoc_2021/src/day_15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use common::{Answer, Solution};
use hashbrown::HashMap;
use nd_vec::vector;

type Pos = nd_vec::Vec2<usize>;

pub struct Day15;

impl Solution for Day15 {
Expand Down Expand Up @@ -48,7 +46,7 @@ impl Solution for Day15 {
out.into()
}

fn part_b(&self, input: &str) -> Answer {
fn part_b(&self, _input: &str) -> Answer {
Answer::Unimplemented
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() -> Result<()> {

fn get_year(year: u16) -> &'static [&'static dyn Solution] {
match year {
2021 => &aoc_2021::ALL,
2021 => aoc_2021::ALL,
2022 => &aoc_2022::ALL,
2023 => aoc_2023::ALL,
_ => &[],
Expand Down

0 comments on commit 1c923af

Please sign in to comment.