about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-08-19 15:30:23 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2018-08-19 17:41:28 +0200
commit71120ef1e5cb885ee45e6148970db6ce93ce1aca (patch)
tree9358c738c8943f0bc0b65303818237a801b8b0e1 /src/libstd
parenta9fe312b98d5a6b194c4ad1a17dcf258ba9941ea (diff)
downloadrust-71120ef1e5cb885ee45e6148970db6ce93ce1aca.tar.gz
rust-71120ef1e5cb885ee45e6148970db6ce93ce1aca.zip
Fix typos found by codespell.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/future.rs2
-rw-r--r--src/libstd/io/buffered.rs2
-rw-r--r--src/libstd/memchr.rs2
-rw-r--r--src/libstd/sync/once.rs2
-rw-r--r--src/libstd/sys/unix/fs.rs2
-rw-r--r--src/libstd/sys/unix/net.rs2
6 files changed, 6 insertions, 6 deletions
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, R>(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<W: Write> Write for LineWriter<W> {
 
         // 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<usize> {
 
 #[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<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")]