Skip to content

Commit

Permalink
♻️ use slice
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Oct 9, 2023
1 parent 3f73086 commit e9deb9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ pub struct RawChunk {
impl RawChunk {
#[inline]
pub fn from_data(ty: ChunkType, data: Vec<u8>) -> Self {
let chunk = (ty, data);
let chunk = (ty, &data[..]);
Self {
length: chunk.length(),
crc: chunk.crc(),
ty: chunk.0,
data: chunk.1,
ty,
data,
}
}
}
Expand Down

0 comments on commit e9deb9e

Please sign in to comment.