Skip to content

Commit

Permalink
💥 Change trait bounds `impl<T: Deref<Target = [u8]>> Chunk for (Chunk…
Browse files Browse the repository at this point in the history
…Type, T)` to `impl<T: AsRef<[u8]>> Chunk for (ChunkType, T)`
  • Loading branch information
ChanTsune committed Nov 16, 2024
1 parent 48cbadb commit 246a801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ impl Chunk for RawChunk {
}
}

impl<T: Deref<Target = [u8]>> Chunk for (ChunkType, T) {
impl<T: AsRef<[u8]>> Chunk for (ChunkType, T) {
#[inline]
fn ty(&self) -> ChunkType {
self.0
}

#[inline]
fn data(&self) -> &[u8] {
&self.1
self.1.as_ref()
}
}

Expand Down

0 comments on commit 246a801

Please sign in to comment.