Skip to content

Commit

Permalink
Remove unstable Initializer, rustc_deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
iceiix committed Jan 17, 2021
1 parent 5bf5164 commit 56cd61e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod tests;

use std::ffi::OsString;
use std::fmt;
use std::io::{self, Initializer, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
use std::io::{self, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
use std::path::{Path, PathBuf};
//use std::sys::fs as fs_imp;
use crate::unix_fs as fs_imp;
Expand Down Expand Up @@ -600,11 +600,6 @@ impl Read for File {
self.inner.is_read_vectored()
}

#[inline]
unsafe fn initializer(&self) -> Initializer {
// SAFETY: Read is guaranteed to work on uninitialized memory
unsafe { Initializer::nop() }
}
}
impl Write for File {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
Expand Down Expand Up @@ -642,12 +637,6 @@ impl Read for &File {
fn is_read_vectored(&self) -> bool {
self.inner.is_read_vectored()
}

#[inline]
unsafe fn initializer(&self) -> Initializer {
// SAFETY: Read is guaranteed to work on uninitialized memory
unsafe { Initializer::nop() }
}
}
impl Write for &File {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
Expand Down Expand Up @@ -1699,11 +1688,6 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Re
/// Ok(())
/// }
/// ```
#[rustc_deprecated(
since = "1.1.0",
reason = "replaced with std::os::unix::fs::symlink and \
std::os::windows::fs::{symlink_file, symlink_dir}"
)]
pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Result<()> {
fs_imp::symlink(original.as_ref(), link.as_ref())
}
Expand Down

0 comments on commit 56cd61e

Please sign in to comment.