fix clippy lints
This commit is contained in:
parent
7c90bccfa8
commit
02bc7875f6
7 changed files with 12 additions and 13 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue