Skip to content

Commit

Permalink
FEAT: implemented get_all function for tdf_blob
Browse files Browse the repository at this point in the history
  • Loading branch information
sander-willems-bruker committed Sep 18, 2024
1 parent a2e4820 commit 9704d09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/io/readers/file_readers/tdf_blob_reader/tdf_blobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ impl TdfBlob {
}
}

pub fn get_all(&self) -> Vec<u32> {
(0..self.len())
.map(|index| self.get(index).unwrap())
.collect()
}

pub fn get(&self, index: usize) -> Option<u32> {
if index >= self.len() {
None
Expand Down

0 comments on commit 9704d09

Please sign in to comment.