1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-04-24 17:12:16 +02:00
This commit is contained in:
Andrew Gallant 2016-11-06 19:48:49 -05:00
parent 6884eea2f5
commit 2e5c3c05e8

View File

@ -552,8 +552,8 @@ impl InputBuffer {
// Rollover bytes from buf[keep_from..end] and update our various
// pointers. N.B. This could be done with the ptr::copy, but I haven't
// been able to produce a benchmark that notices a difference in
// performance. (Invariably, ptr::copy is seems clearer IMO, but it's
// unsafe.)
// performance. (Invariably, ptr::copy is seems clearer IMO, but it is
// not safe.)
self.tmp.clear();
self.tmp.extend_from_slice(&self.buf[keep_from..self.end]);
self.buf[0..self.tmp.len()].copy_from_slice(&self.tmp);