File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -600,7 +600,7 @@ trait CDFContextLogOps: CDFContextLogSize {
600600 let new_len = len + Self :: CDF_LEN_MAX + 1 ;
601601 let capacity = log. data . capacity ( ) ;
602602 debug_assert ! ( new_len <= capacity) ;
603- let dst = log. data . get_unchecked_mut ( len) as * mut u16 ;
603+ let dst = log. data . as_mut_ptr ( ) . add ( len) ;
604604 dst. copy_from_nonoverlapping ( cdf. as_ptr ( ) , Self :: CDF_LEN_MAX ) ;
605605 * dst. add ( Self :: CDF_LEN_MAX ) = offset as u16 ;
606606 log. data . set_len ( new_len) ;
@@ -618,7 +618,7 @@ trait CDFContextLogOps: CDFContextLogSize {
618618 // SAFETY: We use unchecked pointers here for performance.
619619 // Since we know the length, we can ensure not to go OOB.
620620 unsafe {
621- let mut src = log. data . get_unchecked_mut ( len) as * mut u16 ;
621+ let mut src = log. data . as_mut_ptr ( ) . add ( len) ;
622622 while len > checkpoint {
623623 len -= Self :: CDF_LEN_MAX + 1 ;
624624 src = src. sub ( Self :: CDF_LEN_MAX + 1 ) ;
You can’t perform that action at this time.
0 commit comments