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:
Xavier Deguillard 2020-03-16 14:55:06 -07:00 committed by Facebook GitHub Bot
parent 67c8cf22a3
commit deffd9a477

View File

@ -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(),
}