Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ fn map_nix_error(e: nix::Error) -> io::Error {
io::Error::from_raw_os_error(e as i32)
}

#[allow(deprecated)]
fn copy_regfile_inner(
src: &File,
srcmeta: &std::fs::Metadata,
Expand Down Expand Up @@ -689,6 +690,8 @@ pub(crate) fn fallback_file_copy(src: &File, dest: &File) -> io::Result<u64> {
pub trait FileExt {
/// Copy the entire contents of `self` to `to`. This uses operating system
/// specific fast paths if available.
///
#[deprecated = "Use std::io::copy instead"]
fn copy_to(&self, to: &File) -> io::Result<u64>;

/// Update timestamps (both access and modification) to the current time.
Expand Down
1 change: 1 addition & 0 deletions tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ fn exists() -> Result<()> {
}

#[test]
#[allow(deprecated)]
fn copy() -> Result<()> {
let td = tempfile::tempdir()?;
let src_p = td.path().join("testfile");
Expand Down