Skip to content

Commit

Permalink
Add clarifying comment about offset argument
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokoch committed May 16, 2018
1 parent 00ec3cf commit b605923
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/sys/unix/fs.rs
Expand Up @@ -816,6 +816,8 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
let mut written = 0u64;
while written < len {
let copy_result = unsafe {
// We actually don't have to adjust the offsets,
// because copy_file_range adjusts the file offset automatically
cvt(copy_file_range(reader.as_raw_fd(),
ptr::null_mut(),
writer.as_raw_fd(),
Expand Down

0 comments on commit b605923

Please sign in to comment.