Skip to content

Commit

Permalink
Improve code comments
Browse files Browse the repository at this point in the history
"what" comments add no value. Remove one and make the other describe
"why" the cast is ok.
  • Loading branch information
tcharding committed Nov 14, 2023
1 parent fb280a3 commit 4587122
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ecdsa/serialized_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,8 @@ mod tests {
#[test]
fn iterator_ops_are_homomorphic() {
let mut fake_signature_data = [0; MAX_LEN];
// fill it with numbers 0 - 71
for (i, byte) in fake_signature_data.iter_mut().enumerate() {
// up to MAX_LEN
*byte = i as u8;
*byte = i as u8; // cast ok because MAX_LEN fits in u8.
}

let fake_signature = SerializedSignature { data: fake_signature_data, len: MAX_LEN };
Expand Down

0 comments on commit 4587122

Please sign in to comment.