Skip to content

Commit

Permalink
Fix clippy warning (use .first() instead of .get(0))
Browse files Browse the repository at this point in the history
  • Loading branch information
chifflier committed Jan 16, 2024
1 parent a13bd1d commit e71ca28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pcapng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub struct Section<'a> {
impl<'a> Section<'a> {
/// Returns the section header
pub fn header(&self) -> Option<&SectionHeaderBlock> {
if let Some(Block::SectionHeader(ref b)) = self.blocks.get(0) {
if let Some(Block::SectionHeader(ref b)) = self.blocks.first() {
Some(b)
} else {
None
Expand Down

0 comments on commit e71ca28

Please sign in to comment.