Skip to content

Commit

Permalink
Review fixes part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
micahsnyder committed Nov 1, 2023
1 parent b258ad5 commit b238404
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions libclamav_rust/src/onenote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,7 @@ impl<'a> OneNote<'a> {

self.remaining = remaining;

if let Some(file_data) = file_data {
Some(ExtractedFile {
name: None,
data: file_data,
})
} else {
None
}
file_data.map(|data| ExtractedFile { data, name: None, })
}

pub fn next_file_vec(&mut self) -> Option<ExtractedFile> {
Expand Down Expand Up @@ -266,14 +259,7 @@ impl<'a> OneNote<'a> {
None
};

if let Some(file_data) = file_data {
Some(ExtractedFile {
name: None,
data: file_data,
})
} else {
None
}
file_data.map(|data| ExtractedFile { data, name: None, })
}

pub fn next_file_parser(&mut self) -> Option<ExtractedFile> {
Expand Down

0 comments on commit b238404

Please sign in to comment.