Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hschimke committed Aug 1, 2024
1 parent f3e98f5 commit 75cb620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/aztec/EncoderTest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,10 @@ fn testWriter(
) {
// Perform an encode-decode round-trip because it can be lossy.
let mut hints = HashMap::new();
if charset.is_some() {
if let Some(cs) = charset {
hints.insert(
EncodeHintType::CHARACTER_SET,
EncodeHintValue::CharacterSet(charset.unwrap().get_charset_name().to_string()),
EncodeHintValue::CharacterSet(cs.get_charset_name().to_string()),
);
}
// if (null != charset) {
Expand Down
4 changes: 2 additions & 2 deletions src/common/reedsolomon/ReedSolomonTestCase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ fn test_encode_decode_random(field: GenericGFRef, dataSize: usize, ecSize: usize
}
}

fn test_encode_decode(field: GenericGFRef, dataWords: &Vec<i32>, ecWords: &Vec<i32>) {
fn test_encode_decode(field: GenericGFRef, dataWords: &Vec<i32>, ecWords: &[i32]) {
test_encoder(field, dataWords, ecWords);
test_decoder(field, dataWords, ecWords);
}
Expand Down Expand Up @@ -466,7 +466,7 @@ fn test_encoder(field: GenericGFRef, dataWords: &[i32], ecWords: &[i32]) {
);
}

fn test_decoder(field: GenericGFRef, dataWords: &Vec<i32>, ecWords: &[i32]) {
fn test_decoder(field: GenericGFRef, dataWords: &[i32], ecWords: &[i32]) {
let decoder = ReedSolomonDecoder::new(field);
let mut message = vec![0; dataWords.len() + ecWords.len()];
let maxErrors = ecWords.len() / 2;
Expand Down

0 comments on commit 75cb620

Please sign in to comment.