Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trou committed Nov 10, 2024
1 parent 8dea908 commit f9acd4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/crcapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ impl Applet for CRCApplet {
for alg in ALL_CRCS.iter() {
res.push_str(format!("{}: 0x{}\n", alg, self.do_crc(alg, &val)?.as_str()).as_str());
}
return Ok(res.as_bytes().to_vec());
Ok(res.as_bytes().to_vec())
} else {
return Ok(self.do_crc(alg_name, &val)?.as_bytes().to_vec());
Ok(self.do_crc(alg_name, &val)?.as_bytes().to_vec())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/timeapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl Applet for TimeApplet {
let date_str = ts
.format(&format_description::well_known::Rfc3339)
.with_context(|| "Date formatting failed")?;
return Ok(date_str.as_bytes().to_vec());
Ok(date_str.as_bytes().to_vec())
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/xorapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Applet for XorApplet {

fn process(&self, val: Vec<u8>) -> Result<Vec<u8>> {
let inf_key = self.key_bytes.iter().cycle(); // Iterate endlessly over key bytes
return Ok(val.iter().zip(inf_key).map(|(x, k)| x ^ k).collect());
Ok(val.iter().zip(inf_key).map(|(x, k)| x ^ k).collect())
}
}

Expand Down

0 comments on commit f9acd4d

Please sign in to comment.