about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-25 10:29:46 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-25 10:29:46 +0530
commit6c6f2317bae63261123cd94ebe214e80fb6ad78e (patch)
tree00c20a39f5f26cd3f94ea5b949d1194cd68526b1 /src/libstd/io
parentb18584cbd942e2559e718d6318fdbc494e9047bd (diff)
parentab45694198356ae78972025e0d3beece297431d1 (diff)
downloadrust-6c6f2317bae63261123cd94ebe214e80fb6ad78e.tar.gz
rust-6c6f2317bae63261123cd94ebe214e80fb6ad78e.zip
Rollup merge of #22729 - alexcrichton:ptr-stabilization, r=aturon
 Specifically, the following actions were takend:

* The `copy_memory` and `copy_nonoverlapping_memory` functions
  to drop the `_memory` suffix (as it's implied by the functionality). Both
  functions are now marked as `#[stable]`.
* The `set_memory` function was renamed to `write_bytes` and is now stable.
* The `zero_memory` function is now deprecated in favor of `write_bytes`
  directly.
* The `Unique` pointer type is now behind its own feature gate called `unique`
  to facilitate future stabilization.

[breaking-change]
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/buffered.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 9317f647d4f..11356099590 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -155,9 +155,9 @@ impl<W: Write> BufWriter<W> {
         if written > 0 {
             // NB: would be better expressed as .remove(0..n) if it existed
             unsafe {
-                ptr::copy_memory(self.buf.as_mut_ptr(),
-                                 self.buf.as_ptr().offset(written as isize),
-                                 len - written);
+                ptr::copy(self.buf.as_mut_ptr(),
+                          self.buf.as_ptr().offset(written as isize),
+                          len - written);
             }
         }
         self.buf.truncate(len - written);