Skip to content

Commit

Permalink
Improvement: Clippy and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joshleaves committed Dec 6, 2024
1 parent 3e1cfb0 commit b0948e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/year_2015/day_01.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
/// assert_eq!(day_01::day_01_v1(")))"), -3);
/// assert_eq!(day_01::day_01_v1(")())())"), -3);
/// ```
pub fn day_01_v1(input: impl Into<String>) -> i16 {
input
.into()
Expand Down Expand Up @@ -136,7 +135,6 @@ pub fn day_01_v1(input: impl Into<String>) -> i16 {
/// assert_eq!(day_01::day_01_v2(")"), 1);
/// assert_eq!(day_01::day_01_v2("()())"), 5);
/// ```
pub fn day_01_v2(input: impl Into<String>) -> i16 {
input
.into()
Expand Down
4 changes: 2 additions & 2 deletions src/year_2015/day_09.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ use std::cmp;
use std::collections::HashMap;

fn id_for_city<'a>(cities: &mut HashMap<&'a str, u8>, city: &'a str) -> u8 {
return match cities.get(city) {
match cities.get(city) {
Some(city_id) => *city_id,
None => {
let new_id = cities.len() as u8;
cities.insert(city, new_id);
new_id
}
};
}
}

fn parse_input(input: &str) -> (Vec<u8>, HashMap<(u8, u8), u16>) {
Expand Down

0 comments on commit b0948e0

Please sign in to comment.