fix clippy lints
This commit is contained in:
parent
7c90bccfa8
commit
02bc7875f6
7 changed files with 12 additions and 13 deletions
|
|
@ -70,7 +70,7 @@ impl BagRule {
|
|||
all_bags: &HashMap<String, BagRule>,
|
||||
memoized: &mut HashMap<String, bool>,
|
||||
) -> bool {
|
||||
return match memoized.get(&self.color) {
|
||||
match memoized.get(&self.color) {
|
||||
Some(value) => *value,
|
||||
None => {
|
||||
let value = self.contains.iter().any(|(_, c)| c == color)
|
||||
|
|
@ -85,7 +85,7 @@ impl BagRule {
|
|||
|
||||
value
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
fn num_inner_bags(&self, all_bags: &HashMap<String, BagRule>) -> usize {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ fn find_timestamp(input: &str) -> Result<u64> {
|
|||
}
|
||||
|
||||
fn satisfies_constraint(solution: u64, (remainder, divisor): (u64, u64)) -> bool {
|
||||
((solution + remainder) % divisor) == 0
|
||||
(solution + remainder).is_multiple_of(divisor)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue