diff --git a/libcc2rs/src/io.rs b/libcc2rs/src/io.rs index a9f3ce49..32c11623 100644 --- a/libcc2rs/src/io.rs +++ b/libcc2rs/src/io.rs @@ -112,7 +112,7 @@ pub fn fread_refcount(a0: AnyPtr, a1: u64, a2: u64, a3: Ptr<::std::fs::File>) -> for &byte in &buffer[..n] { dst.write(byte); - dst = dst.offset(1); + dst += 1; } read_bytes += n; diff --git a/libcc2rs/src/rc.rs b/libcc2rs/src/rc.rs index 63f1942b..877e73fd 100644 --- a/libcc2rs/src/rc.rs +++ b/libcc2rs/src/rc.rs @@ -641,7 +641,7 @@ impl Iterator for StringIterator { // skip the null terminator if self.ptr.get_offset() + 1 < self.ptr.len() { let value = self.ptr.clone(); - self.ptr = self.ptr.offset(1); + self.ptr += 1; Some(value) } else { None