add ptr_offset_by_literal clippy lint and set to deny

This commit is contained in:
auronandace
2026-07-06 12:40:43 +01:00
parent 9930a90de0
commit bf6dc24407
15 changed files with 51 additions and 50 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ pub unsafe extern "C" fn fgets(
let unget_read_size = cmp::min(left, stream.unget.len());
for _ in 0..unget_read_size {
unsafe { *out = stream.unget.pop().unwrap() as c_char };
out = unsafe { out.offset(1) };
out = unsafe { out.add(1) };
}
left -= unget_read_size;
}