Feature ptr_offset_from #41079 available in 1.47

This commit is contained in:
gwenn 2020-10-08 21:12:46 +02:00
parent 5cf0158863
commit 6ae9802fa3

View File

@ -250,8 +250,7 @@ impl InnerConnection {
let tail = if c_tail.is_null() {
0
} else {
// TODO nightly feature ptr_offset_from #41079
let n = (c_tail as isize) - (c_sql as isize);
let n = unsafe { c_tail.offset_from(c_sql) };
if n <= 0 || n >= len as isize {
0
} else {