diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-10-10 10:56:58 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-10-10 10:56:58 -0700 |
commit | 6e353ce356541ef9b3a798fd98bbf13eedc54628 (patch) | |
tree | 415afcc702027632147d6b2b5d908458b5209a6b /src/percent_encoded_character_decoder.rs | |
parent | 4ed2297a7e31f7093582a00783c9c1f59f492a0d (diff) |
Remove explicit test vector array length declarations
This method was proposed by @Serayen.
Diffstat (limited to 'src/percent_encoded_character_decoder.rs')
-rw-r--r-- | src/percent_encoded_character_decoder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/percent_encoded_character_decoder.rs b/src/percent_encoded_character_decoder.rs index 01f65f4..44731c6 100644 --- a/src/percent_encoded_character_decoder.rs +++ b/src/percent_encoded_character_decoder.rs @@ -94,14 +94,14 @@ mod tests { expected_output: u8, } ); - let test_vectors: [TestVector; 5] = [ + let test_vectors: &[TestVector] = &[ (['4', '1'], b'A').into(), (['5', 'A'], b'Z').into(), (['6', 'e'], b'n').into(), (['e', '1'], b'\xe1').into(), (['C', 'A'], b'\xca').into(), ]; - for test_vector in &test_vectors { + for test_vector in test_vectors { let mut pec = PercentEncodedCharacterDecoder::new(); assert_eq!( Ok(None), |