Applied a couple of Clippy lints

This commit is contained in:
2026-03-11 14:21:10 -04:00
parent 9472c049ee
commit 755b6583f1
5 changed files with 12 additions and 7 deletions

View File

@@ -289,6 +289,9 @@ impl Ticket {
self.signature = [0; 256];
let mut current_int: u16 = 0;
let mut test_hash: [u8; 20] = [255; 20];
// We're using the "unknown2" field as a 16-bit integer and incrementing it to brute force
// the hash that we need.
while test_hash[0] != 0 {
if current_int == 65535 { return Err(TicketError::CannotFakesign); }
current_int += 1;

View File

@@ -351,6 +351,9 @@ impl TMD {
self.signature = [0; 256];
let mut current_int: u16 = 0;
let mut test_hash: [u8; 20] = [255; 20];
// We're using the unused "minor version" field of the TMD as a 16-bit integer and
// incrementing it to brute force the hash that we need.
while test_hash[0] != 0 {
if current_int == 65535 { return Err(TMDError::CannotFakesign); }
current_int += 1;