From 2204c7ea3a5768122753fe69a06e4bac9d54b7a5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 8 Jul 2022 12:06:07 -0700 Subject: [PATCH] Resolve ptr_offset_with_cast clippy lint --- src/bin/run-emitter-test-suite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/run-emitter-test-suite.rs b/src/bin/run-emitter-test-suite.rs index 38479d1..35979cb 100644 --- a/src/bin/run-emitter-test-suite.rs +++ b/src/bin/run-emitter-test-suite.rs @@ -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::(); - 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' ' {