diff --git a/src/aztec/EncoderTest.rs b/src/aztec/EncoderTest.rs index 3b987289..85fb26f2 100644 --- a/src/aztec/EncoderTest.rs +++ b/src/aztec/EncoderTest.rs @@ -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) { diff --git a/src/common/reedsolomon/ReedSolomonTestCase.rs b/src/common/reedsolomon/ReedSolomonTestCase.rs index df17788e..e5be80d5 100644 --- a/src/common/reedsolomon/ReedSolomonTestCase.rs +++ b/src/common/reedsolomon/ReedSolomonTestCase.rs @@ -435,7 +435,7 @@ fn test_encode_decode_random(field: GenericGFRef, dataSize: usize, ecSize: usize } } -fn test_encode_decode(field: GenericGFRef, dataWords: &Vec, ecWords: &Vec) { +fn test_encode_decode(field: GenericGFRef, dataWords: &Vec, ecWords: &[i32]) { test_encoder(field, dataWords, ecWords); test_decoder(field, dataWords, ecWords); } @@ -466,7 +466,7 @@ fn test_encoder(field: GenericGFRef, dataWords: &[i32], ecWords: &[i32]) { ); } -fn test_decoder(field: GenericGFRef, dataWords: &Vec, 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;