Fix final clippy warnings

This commit is contained in:
2020-12-27 23:06:50 +01:00
parent e9870a1f18
commit e88ef7b410
3 changed files with 6 additions and 4 deletions

View File

@@ -16,12 +16,12 @@ impl FromStr for Entry {
type Err = Infallible;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.starts_with("mask = ") {
if let Some(s) = s.strip_prefix("mask = ") {
let mut zero_mask = 0;
let mut one_mask = 0;
let mut x_mask = 0;
for c in s[7..].chars() {
for c in s.chars() {
zero_mask <<= 1;
one_mask <<= 1;
x_mask <<= 1;