diff --git a/lib/src/chunk.rs b/lib/src/chunk.rs index aab87be8..7a7fe4a2 100644 --- a/lib/src/chunk.rs +++ b/lib/src/chunk.rs @@ -37,12 +37,12 @@ pub struct RawChunk { impl RawChunk { #[inline] pub fn from_data(ty: ChunkType, data: Vec) -> Self { - let chunk = (ty, data); + let chunk = (ty, &data[..]); Self { length: chunk.length(), crc: chunk.crc(), - ty: chunk.0, - data: chunk.1, + ty, + data, } } }