Skip to content

Commit

Permalink
Use byte instead of i
Browse files Browse the repository at this point in the history
The identifier `i` is predominantly used for indexing an array but we
are using it as a place holder for the iterated value of an array that
is then printed. The identifier `byte` is more descriptive.

Done in preparation for adding similar code to the `ecdh` module.
  • Loading branch information
tcharding committed Feb 18, 2022
1 parent 45c0447 commit 5af56ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/secret.rs
Expand Up @@ -101,8 +101,8 @@ impl fmt::Debug for DisplaySecret {

impl fmt::Display for DisplaySecret {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for i in &self.secret {
write!(f, "{:02x}", i)?;
for byte in &self.secret {
write!(f, "{:02x}", byte)?;
}
Ok(())
}
Expand Down

0 comments on commit 5af56ec

Please sign in to comment.