From 71120ef1e5cb885ee45e6148970db6ce93ce1aca Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 19 Aug 2018 15:30:23 +0200 Subject: Fix typos found by codespell. --- src/libstd/future.rs | 2 +- src/libstd/io/buffered.rs | 2 +- src/libstd/memchr.rs | 2 +- src/libstd/sync/once.rs | 2 +- src/libstd/sys/unix/fs.rs | 2 +- src/libstd/sys/unix/net.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 12ea1ea9f9d..cadb5c0ba5d 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -88,7 +88,7 @@ where /// This function acquires exclusive access to the task context. /// /// Panics if no task has been set or if the task context has already been -/// retrived by a surrounding call to get_task_cx. +/// retrieved by a surrounding call to get_task_cx. pub fn get_task_cx(f: F) -> R where F: FnOnce(&mut task::Context) -> R diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 03c97de6ec1..77bc7e946eb 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -889,7 +889,7 @@ impl Write for LineWriter { // Find the last newline character in the buffer provided. If found then // we're going to write all the data up to that point and then flush, - // otherewise we just write the whole block to the underlying writer. + // otherwise we just write the whole block to the underlying writer. let i = match memchr::memrchr(b'\n', buf) { Some(i) => i, None => return self.inner.write(buf), diff --git a/src/libstd/memchr.rs b/src/libstd/memchr.rs index 240e82069ff..c28f3da98ce 100644 --- a/src/libstd/memchr.rs +++ b/src/libstd/memchr.rs @@ -57,7 +57,7 @@ pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { #[cfg(test)] mod tests { - // test the implementations for the current plattform + // test the implementations for the current platform use super::{memchr, memrchr}; #[test] diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index f6cb8beae84..f258ff073e2 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -176,7 +176,7 @@ impl Once { /// happens-before relation between the closure and code executing after the /// return). /// - /// If the given closure recusively invokes `call_once` on the same `Once` + /// If the given closure recursively invokes `call_once` on the same `Once` /// instance the exact behavior is not specified, allowed outcomes are /// a panic or a deadlock. /// 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 { 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")] -- cgit 1.4.1-3-g733a5