From e9deb9e167f22d60dabd1026a46e6c960c8a37e6 Mon Sep 17 00:00:00 2001 From: ChanTsune <41658782+ChanTsune@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:51:19 +0900 Subject: [PATCH] :recycle: use slice --- lib/src/chunk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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, } } }