fix clippy lints

This commit is contained in:
Antoine Martin 2025-12-01 13:59:04 +01:00
parent 7c90bccfa8
commit 02bc7875f6
7 changed files with 12 additions and 13 deletions

View file

@ -84,7 +84,7 @@ impl std::str::FromStr for RucksackSplit {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.len() % 2 != 0 {
if !s.len().is_multiple_of(2) {
bail!(
"rucksack should contain an even number of items, this one contained {}",
s.len()