Skip to content

Commit 4587122

Browse files
committed
Improve code comments
"what" comments add no value. Remove one and make the other describe "why" the cast is ok.
1 parent fb280a3 commit 4587122

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ecdsa/serialized_signature.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,8 @@ mod tests {
272272
#[test]
273273
fn iterator_ops_are_homomorphic() {
274274
let mut fake_signature_data = [0; MAX_LEN];
275-
// fill it with numbers 0 - 71
276275
for (i, byte) in fake_signature_data.iter_mut().enumerate() {
277-
// up to MAX_LEN
278-
*byte = i as u8;
276+
*byte = i as u8; // cast ok because MAX_LEN fits in u8.
279277
}
280278

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

0 commit comments

Comments
 (0)