diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-06-02 07:59:11 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-06-10 01:35:47 +0000 |
| commit | fff822fead6249671cbcb090b24bce58fab38de0 (patch) | |
| tree | 417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/libstd/sys/unix/fs.rs | |
| parent | 283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff) | |
| download | rust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz rust-fff822fead6249671cbcb090b24bce58fab38de0.zip | |
Migrate to numeric associated consts
Diffstat (limited to 'src/libstd/sys/unix/fs.rs')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 80cf6a5dbc2..29cdbf05354 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -1196,7 +1196,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> { let mut written = 0u64; while written < len { let copy_result = if has_copy_file_range { - let bytes_to_copy = cmp::min(len - written, usize::max_value() as u64) as usize; + let bytes_to_copy = cmp::min(len - written, usize::MAX as u64) as usize; let copy_result = unsafe { // We actually don't have to adjust the offsets, // because copy_file_range adjusts the file offset automatically |
