about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-23 11:39:16 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-24 14:22:33 -0800
commitab45694198356ae78972025e0d3beece297431d1 (patch)
tree4d2c73d9bdbce4cbb9b8bb14ff866c74e41382b3 /src/libstd/io
parent0bd15657d93c932611f3aee351b6521cdfa77731 (diff)
downloadrust-ab45694198356ae78972025e0d3beece297431d1.tar.gz
rust-ab45694198356ae78972025e0d3beece297431d1.zip
std: Stabilize some `ptr` functions
Specifically, the following actions were taken:

* 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.
* All type parameters now are `T: ?Sized` wherever possible and new clauses were
  added to the `offset` functions to require that the type is sized.

[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 9ef31978236..6458dfc5aa2 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);