summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-11-06 19:48:17 -0500
committerAndrew Gallant <jamslam@gmail.com>2016-11-06 19:48:17 -0500
commit6884eea2f57cfb63e7fe7fb1d993345d430ef0bd (patch)
tree49262027928d651a8d5d45dc91fb569eb67ba808 /src
parenta3a2f0be6a0f5fad890cd7a87dd07c98946f208b (diff)
reword
Diffstat (limited to 'src')
-rw-r--r--src/search_stream.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/search_stream.rs b/src/search_stream.rs
index 5b3880b6..3b4b94d4 100644
--- a/src/search_stream.rs
+++ b/src/search_stream.rs
@@ -550,9 +550,10 @@ impl InputBuffer {
keep_from: usize,
) -> Result<bool, io::Error> {
// Rollover bytes from buf[keep_from..end] and update our various
- // pointers. N.B. This could be done with the unsafe ptr::copy, but
- // I haven't been able to produce a benchmark that notices a difference
- // in performance. (Invariably, ptr::copy is also clearer IMO.)
+ // 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.)
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);