From 8d335fe4d79640f6d08d0cde34052e76baa1bf6e Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Sat, 26 Oct 2024 17:41:49 -0600 Subject: [PATCH] Remove unnecessary enumeration in test --- tests/log_entry_parsing.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/log_entry_parsing.rs b/tests/log_entry_parsing.rs index 897a208..0e60021 100644 --- a/tests/log_entry_parsing.rs +++ b/tests/log_entry_parsing.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use base64ct::Encoding; use ct::{ merkle::{ - consts::{EXTRA_DATA_BASE64_BUFFER_SIZE, LEAF_BASE64_BUFFER_SIZE}, - types::{LogEntryType, MerkleLeafType, Version} + consts::EXTRA_DATA_BASE64_BUFFER_SIZE, + types::{MerkleLeafType, Version} }, parsing::entry::{parse_entry_extra_data_precert, parse_entry_extra_data_x509} }; @@ -50,7 +50,7 @@ async fn fetch_entries() -> impl Iterator { async fn test_letsencrypt_2024h2_parsing() { let mut buffer = [0u8; EXTRA_DATA_BASE64_BUFFER_SIZE]; - for (i, entry) in fetch_entries().await.enumerate() { + for entry in fetch_entries().await { // Parse leaf_input buffer[..entry.leaf_input.len()].copy_from_slice(entry.leaf_input.as_bytes()); let parsed = @@ -90,7 +90,7 @@ async fn test_letsencrypt_2024h2_parsing() { parse_entry_extra_data(parsed).expect("extra_data should parse properly"); // extra_data assertions - assert_eq!(input.len(), 0, "All input should be parsed at entry {i}"); + assert_eq!(input.len(), 0, "All input should be parsed"); match parsed { ct::merkle::types::EntryExtraData::X509Certificate(chain) => assert_ne!(chain.len(), 0, "x509 chain should not be 0 length"),