Skip to content

Commit

Permalink
Auto merge of #57625 - drrlvn:patch-1, r=Centril
Browse files Browse the repository at this point in the history
Stabilize FileExt::read_exact_at/write_all_at

r? alexcrichton

Closes #51984.
  • Loading branch information
bors committed Jan 15, 2019
2 parents 33e6df4 + 33ac583 commit 9201924
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libstd/sys/unix/ext/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ pub trait FileExt {
/// # Examples
///
/// ```no_run
/// #![feature(rw_exact_all_at)]
/// use std::io;
/// use std::fs::File;
/// use std::os::unix::prelude::FileExt;
Expand All @@ -99,7 +98,7 @@ pub trait FileExt {
/// Ok(())
/// }
/// ```
#[unstable(feature = "rw_exact_all_at", issue = "51984")]
#[stable(feature = "rw_exact_all_at", since = "1.33.0")]
fn read_exact_at(&self, mut buf: &mut [u8], mut offset: u64) -> io::Result<()> {
while !buf.is_empty() {
match self.read_at(buf, offset) {
Expand Down Expand Up @@ -181,7 +180,6 @@ pub trait FileExt {
/// # Examples
///
/// ```no_run
/// #![feature(rw_exact_all_at)]
/// use std::fs::File;
/// use std::io;
/// use std::os::unix::prelude::FileExt;
Expand All @@ -194,7 +192,7 @@ pub trait FileExt {
/// Ok(())
/// }
/// ```
#[unstable(feature = "rw_exact_all_at", issue = "51984")]
#[stable(feature = "rw_exact_all_at", since = "1.33.0")]
fn write_all_at(&self, mut buf: &[u8], mut offset: u64) -> io::Result<()> {
while !buf.is_empty() {
match self.write_at(buf, offset) {
Expand Down

0 comments on commit 9201924

Please sign in to comment.