diff options
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/net.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/pipe.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 7a89d9857bb..1d5b0cfa94a 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -857,7 +857,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> { use sync::atomic::{AtomicBool, Ordering}; // Kernel prior to 4.5 don't have copy_file_range - // We store the availability in a global to avoid unneccessary syscalls + // We store the availability in a global to avoid unnecessary syscalls static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(true); unsafe fn copy_file_range( diff --git a/src/libstd/sys/unix/net.rs b/src/libstd/sys/unix/net.rs index 04d9f0b06d3..8c73fe8c612 100644 --- a/src/libstd/sys/unix/net.rs +++ b/src/libstd/sys/unix/net.rs @@ -35,7 +35,7 @@ use libc::SOCK_CLOEXEC; #[cfg(not(target_os = "linux"))] const SOCK_CLOEXEC: c_int = 0; -// Another conditional contant for name resolution: Macos et iOS use +// Another conditional constant for name resolution: Macos et iOS use // SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket. // Other platforms do otherwise. #[cfg(target_vendor = "apple")] diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs index df1dd7401af..4b19519a57a 100644 --- a/src/libstd/sys/windows/pipe.rs +++ b/src/libstd/sys/windows/pipe.rs @@ -359,6 +359,6 @@ unsafe fn slice_to_end(v: &mut Vec<u8>) -> &mut [u8] { if v.capacity() == v.len() { v.reserve(1); } - slice::from_raw_parts_mut(v.as_mut_ptr().offset(v.len() as isize), + slice::from_raw_parts_mut(v.as_mut_ptr().add(v.len()), v.capacity() - v.len()) } |
