Resolve ptr_offset_with_cast clippy lint

This commit is contained in:
David Tolnay 2022-07-08 12:06:07 -07:00
parent c69e847a68
commit 2204c7ea3a
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -236,7 +236,7 @@ unsafe fn get_value(line: &[u8], value: *mut i8, style: *mut yaml_scalar_style_t
let line_len = line.len();
let line = line as *const [u8] as *mut i8;
let mut start = ptr::null_mut::<i8>();
let end = line.offset(line_len as isize);
let end = line.add(line_len);
let mut c = line.offset(4);
while c < end {
if *c as u8 == b' ' {