Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRabotin committed Sep 8, 2023
1 parent 6ecf861 commit ab26076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/naif/daf/daf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<R: NAIFSummaryRecord> DAF<R> {
}

pub fn from_static<B: Deref<Target = [u8]>>(bytes: &'static B) -> Result<Self, AniseError> {
let crc32_checksum = crc32fast::hash(&bytes);
let crc32_checksum = crc32fast::hash(bytes);
let file_record = FileRecord::read_from(&bytes[..FileRecord::SIZE]).unwrap();
// Check that the endian-ness is compatible with this platform.
file_record.endianness()?;
Expand All @@ -104,7 +104,7 @@ impl<R: NAIFSummaryRecord> DAF<R> {
Ok(Self {
file_record,
name_record,
bytes: Bytes::from_static(&bytes),
bytes: Bytes::from_static(bytes),
crc32_checksum,
_daf_type: PhantomData,
})

Check warning on line 110 in src/naif/daf/daf.rs

View check run for this annotation

Codecov / codecov/patch

src/naif/daf/daf.rs#L98-L110

Added lines #L98 - L110 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion src/structure/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ impl<'a, T: DataSetT<'a>, const ENTRIES: usize> Decode<'a> for DataSet<'a, T, EN
lut,
data_checksum: crc32_checksum,
bytes: bytes.as_bytes(),
_daf_type: PhantomData::<T>::default(),
_daf_type: PhantomData::<T>,
})
}
}
Expand Down

0 comments on commit ab26076

Please sign in to comment.