mirror of
https://github.com/facebook/sapling.git
synced 2024-12-24 13:34:37 +03:00
minibytes: address clippy warnings
Summary: Using ptr.add is shorter and preferred to ptr.offset. Reviewed By: quark-zju Differential Revision: D20452752 fbshipit-source-id: 1dc2fdbc392267d2d690673c10dcc161ecd00dfa
This commit is contained in:
parent
67c8cf22a3
commit
deffd9a477
@ -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(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user