diff --git a/eden/scm/lib/minibytes/src/bytes.rs b/eden/scm/lib/minibytes/src/bytes.rs index 8764a9115c..439e9736f6 100644 --- a/eden/scm/lib/minibytes/src/bytes.rs +++ b/eden/scm/lib/minibytes/src/bytes.rs @@ -68,7 +68,7 @@ where } else { T::check_slice_bytes(self.as_bytes(), start, end); Self { - ptr: unsafe { self.ptr.offset(start as isize) }, + ptr: unsafe { self.ptr.add(start) }, len: end - start, owner: self.owner.clone(), }