File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ impl<'a> Writer<'a> {
163163 let len = range. end - range. start ;
164164
165165 if self . remaining ( ) >= len + N {
166- // SAFETY: we know that our window has at least a core::mem::size_of::<N>() extra bytes
166+ // SAFETY: we know that our window has at least a N extra bytes
167167 // at the end, making it always safe to perform an (unaligned) Chunk read anywhere in
168168 // the window slice.
169169 //
@@ -339,8 +339,8 @@ impl<'a> Writer<'a> {
339339
340340 /// # Safety
341341 ///
342- /// `src` must be safe to perform unaligned reads in `core::mem::size_of::<N>()` chunks until
343- /// `end ` is reached. `dst` must be safe to (unaligned) write that number of chunks.
342+ /// `src..src + length ` must be safe to perform reads in chunks of N elements until
343+ /// `src + length ` is reached. `dst` must be safe to (unaligned) write that number of chunks.
344344 #[ inline( always) ]
345345 unsafe fn copy_chunk_unchecked < const N : usize > (
346346 mut src : * const MaybeUninit < u8 > ,
You can’t perform that action at this time.
0 commit comments