summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Tescher <jatescher@gmail.com>2018-05-08 14:44:17 -0400
committerCarl Lerche <me@carllerche.com>2018-05-08 11:44:17 -0700
commit06b2c402227b4c0f64912e48966f2751dd872ccc (patch)
tree736fceef44b46484e93559bb5e7d0a06e623b3bc
parent68b82f5721cbfa2076f53fa24961ee9273395b39 (diff)
Fix typos (#348)
-rw-r--r--examples/README.md2
-rw-r--r--examples/chat.rs2
-rw-r--r--examples/echo-udp.rs2
-rw-r--r--examples/echo.rs2
-rw-r--r--examples/proxy.rs2
-rw-r--r--src/executor/current_thread/mod.rs6
-rw-r--r--src/executor/current_thread/scheduler.rs4
-rw-r--r--src/executor/mod.rs2
-rw-r--r--src/net.rs2
-rw-r--r--src/runtime/builder.rs2
-rw-r--r--src/util/future.rs2
-rw-r--r--tokio-executor/src/park.rs10
-rw-r--r--tokio-io/src/allow_std.rs2
-rw-r--r--tokio-reactor/src/poll_evented.rs4
-rw-r--r--tokio-reactor/src/registration.rs2
-rw-r--r--tokio-tcp/src/listener.rs2
-rw-r--r--tokio-threadpool/src/blocking.rs2
-rw-r--r--tokio-threadpool/src/builder.rs2
-rw-r--r--tokio-threadpool/src/park/default_park.rs2
-rw-r--r--tokio-threadpool/src/pool/backup_stack.rs2
-rw-r--r--tokio-threadpool/src/task/blocking.rs4
-rw-r--r--tokio-threadpool/src/worker/mod.rs2
-rw-r--r--tokio-threadpool/src/worker/stack.rs4
-rw-r--r--tokio-threadpool/tests/blocking.rs2
-rw-r--r--tokio-timer/src/timer/entry.rs4
-rw-r--r--tokio-timer/src/timer/mod.rs2
-rw-r--r--tokio-timer/src/timer/registration.rs2
-rw-r--r--tokio-timer/tests/delay.rs2
-rw-r--r--tokio-udp/src/frame.rs2
-rw-r--r--tokio-udp/src/lib.rs2
30 files changed, 41 insertions, 41 deletions
diff --git a/examples/README.md b/examples/README.md
index 19f33ff6..931139e3 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -38,7 +38,7 @@ A high level description of each example is:
in multiple terminals and use it to chat between the terminals.
* [`chat-combinator`](chat-combinator.rs) - Similar to `chat`, but this uses a
- much more functional programming approch using combinators.
+ much more functional programming approach using combinators.
* [`proxy`](proxy.rs) - an example proxy server that will forward all connected
TCP clients to the remote address specified when starting the program.
diff --git a/examples/chat.rs b/examples/chat.rs
index a2eb95e1..36a0041b 100644
--- a/examples/chat.rs
+++ b/examples/chat.rs
@@ -157,7 +157,7 @@ impl Peer {
/// This is where a connected client is managed.
///
-/// A `Peer` is also a future representing completly processing the client.
+/// A `Peer` is also a future representing completely processing the client.
///
/// When a `Peer` is created, the first line (representing the client's name)
/// has already been read. When the socket closes, the `Peer` future completes.
diff --git a/examples/echo-udp.rs b/examples/echo-udp.rs
index e25f0936..9a1b9684 100644
--- a/examples/echo-udp.rs
+++ b/examples/echo-udp.rs
@@ -68,6 +68,6 @@ fn main() {
// `map_err` handles the error by logging it and maps the future to a type
// that can be spawned.
//
- // `tokio::run` spanws the task on the Tokio runtime and starts running.
+ // `tokio::run` spawns the task on the Tokio runtime and starts running.
tokio::run(server.map_err(|e| println!("server error = {:?}", e)));
}
diff --git a/examples/echo.rs b/examples/echo.rs
index e4fe65cc..92d65a90 100644
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -3,7 +3,7 @@
//! This server will create a TCP listener, accept connections in a loop, and
//! write back everything that's read off of each TCP connection.
//!
-//! Because the Tokio runtime uses a thread poool, each TCP connection is
+//! Because the Tokio runtime uses a thread pool, each TCP connection is
//! processed concurrently with all other TCP connections across multiple
//! threads.
//!
diff --git a/examples/proxy.rs b/examples/proxy.rs
index 42b740df..bed8314a 100644
--- a/examples/proxy.rs
+++ b/examples/proxy.rs
@@ -1,7 +1,7 @@
//! A proxy that forwards data to another server and forwards that server's
//! responses back to clients.
//!
-//! Because the Tokio runtime uses a thread poool, each TCP connection is
+//! Because the Tokio runtime uses a thread pool, each TCP connection is
//! processed concurrently with all other TCP connections across multiple
//! threads.
//!
diff --git a/src/executor/current_thread/mod.rs b/src/executor/current_thread/mod.rs
index 70eb8e51..81c3b8a8 100644
--- a/src/executor/current_thread/mod.rs
+++ b/src/executor/current_thread/mod.rs
@@ -160,7 +160,7 @@ impl Turn {
}
}
-/// A `CurrentThread` instance bound to a supplied execution conext.
+/// A `CurrentThread` instance bound to a supplied execution context.
pub struct Entered<'a, P: Park + 'a> {
executor: &'a mut CurrentThread<P>,
enter: &'a mut Enter,
@@ -248,7 +248,7 @@ where F: FnOnce(&mut Context) -> R
/// and blocks the current thread until the provided future and **all**
/// subsequently spawned futures complete. In other words:
///
-/// * If the provided boostrap future does **not** spawn any additional tasks,
+/// * If the provided bootstrap future does **not** spawn any additional tasks,
/// `block_on_all` returns once `future` completes.
/// * If the provided bootstrap future **does** spawn additional tasks, then
/// `block_on_all` returns once **all** spawned futures complete.
@@ -733,7 +733,7 @@ impl RunTimeoutError {
RunTimeoutError { timeout }
}
- /// Returns `true` if the error was caused by the operation timeing out.
+ /// Returns `true` if the error was caused by the operation timing out.
pub fn is_timeout(&self) -> bool {
self.timeout
}
diff --git a/src/executor/current_thread/scheduler.rs b/src/executor/current_thread/scheduler.rs
index 3d7600f8..c66523bf 100644
--- a/src/executor/current_thread/scheduler.rs
+++ b/src/executor/current_thread/scheduler.rs
@@ -52,7 +52,7 @@ struct List<U> {
// Specifically, when a node is stored in at least one of the two lists
// described above, this represents a logical `Arc` handle. This is how
// `Scheduler` maintains its reference to all nodes it manages. Each
-// `NotifyHande` instance is an `Arc<Node>` as well.
+// `NotifyHandle` instance is an `Arc<Node>` as well.
//
// When `Scheduler` drops, it clears the linked list of all nodes that it
// manages. When doing so, it must attempt to decrement the reference count (by
@@ -642,7 +642,7 @@ impl<'a, U> Clone for Notify<'a, U> {
impl<'a, U> fmt::Debug for Notify<'a, U> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
- fmt.debug_struct("Notiy").finish()
+ fmt.debug_struct("Notify").finish()
}
}
diff --git a/src/executor/mod.rs b/src/executor/mod.rs
index 52f43934..7b4b202c 100644
--- a/src/executor/mod.rs
+++ b/src/executor/mod.rs
@@ -21,7 +21,7 @@
//!
//! * **[`thread_pool`]**: A multi-threaded executor that maintains a pool of
//! threads. Tasks are spawned to one of the threads in the pool and executed.
-//! The pool employes a [work-stealing] strategy for optimizing how tasks get
+//! The pool employs a [work-stealing] strategy for optimizing how tasks get
//! spread across the available threads.
//!
//! # `Executor` trait.
diff --git a/src/net.rs b/src/net.rs
index f3378eea..3336acd7 100644
--- a/src/net.rs
+++ b/src/net.rs
@@ -27,7 +27,7 @@
//! Reading and writing to it can be done using futures, which return the
//! [`RecvDgram`] and [`SendDgram`] structs respectively.
//!
-//! For convience it's also possible to convert raw datagrams into higher-level
+//! For convenience it's also possible to convert raw datagrams into higher-level
//! frames.
//!
//! [`UdpSocket`]: struct.UdpSocket.html
diff --git a/src/runtime/builder.rs b/src/runtime/builder.rs
index 2c2bbf02..6953426d 100644
--- a/src/runtime/builder.rs
+++ b/src/runtime/builder.rs
@@ -11,7 +11,7 @@ use tokio_timer::timer::{self, Timer};
/// Builds Tokio Runtime with custom configuration values.
///
-/// Methods can be chanined in order to set the configuration values. The
+/// Methods can be chained in order to set the configuration values. The
/// Runtime is constructed by calling [`build`].
///
/// New instances of `Builder` are obtained via [`Builder::new`].
diff --git a/src/util/future.rs b/src/util/future.rs
index 9e0fd6f0..d03ce7fa 100644
--- a/src/util/future.rs
+++ b/src/util/future.rs
@@ -24,7 +24,7 @@ pub trait FutureExt: Future {
///
/// This combinator creates a new future which wraps the receiving future
/// with a deadline. The returned future is allowed to execute until it
- /// completes or `deadline` is reached, whicheever happens first.
+ /// completes or `deadline` is reached, whichever happens first.
///
/// If the future completes before `deadline` then the future will resolve
/// with that item. Otherwise the future will resolve to an error once
diff --git a/tokio-executor/src/park.rs b/tokio-executor/src/park.rs
index 5f03889b..ca03c237 100644
--- a/tokio-executor/src/park.rs
+++ b/tokio-executor/src/park.rs
@@ -29,7 +29,7 @@
//!
//! * If [`unpark`] is called before [`park`], the next call to [`park`] will
//! **not** block the thread.
-//! * **Spurious** wakeups are permited, i.e., the [`park`] method may unblock
+//! * **Spurious** wakeups are permitted, i.e., the [`park`] method may unblock
//! even if [`unpark`] was not called.
//! * [`park_timeout`] does the same as [`park`] but allows specifying a maximum
//! time to block the thread for.
@@ -75,7 +75,7 @@ pub trait Park {
///
/// # Panics
///
- /// This function **should** not panic, but ultimiately, panics are left as
+ /// This function **should** not panic, but ultimately, panics are left as
/// an implementation detail. Refer to the documentation for the specific
/// `Park` implementation
///
@@ -95,7 +95,7 @@ pub trait Park {
///
/// # Panics
///
- /// This function **should** not panic, but ultimiately, panics are left as
+ /// This function **should** not panic, but ultimately, panics are left as
/// an implementation detail. Refer to the documentation for the specific
/// `Park` implementation
///
@@ -119,7 +119,7 @@ pub trait Unpark: Sync + Send + 'static {
///
/// # Panics
///
- /// This function **should** not panic, but ultimiately, panics are left as
+ /// This function **should** not panic, but ultimately, panics are left as
/// an implementation detail. Refer to the documentation for the specific
/// `Unpark` implementation
///
@@ -264,7 +264,7 @@ impl Inner {
None => self.condvar.wait(m).unwrap(),
};
- // Transition back to idle. If the state has transitione dto `NOTIFY`,
+ // Transition back to idle. If the state has transitioned to `NOTIFY`,
// this will consume that notification
self.state.store(IDLE, Ordering::SeqCst);
diff --git a/tokio-io/src/allow_std.rs b/tokio-io/src/allow_std.rs
index ffa17910..46b0376b 100644
--- a/tokio-io/src/allow_std.rs
+++ b/tokio-io/src/allow_std.rs
@@ -76,6 +76,6 @@ impl<T> io::Read for AllowStdIo<T> where T: io::Read {
}
impl<T> AsyncRead for AllowStdIo<T> where T: io::Read {
- // TODO: override prepare_unitialized_buffer once `Read::initializer` is stable.
+ // TODO: override prepare_uninitialized_buffer once `Read::initializer` is stable.
// See rust-lang/rust #42788
}
diff --git a/tokio-reactor/src/poll_evented.rs b/tokio-reactor/src/poll_evented.rs
index 960d5fcd..6082df94 100644
--- a/tokio-reactor/src/poll_evented.rs
+++ b/tokio-reactor/src/poll_evented.rs
@@ -27,7 +27,7 @@ use std::sync::atomic::Ordering::Relaxed;
///
/// **Note**: While `PollEvented` is `Sync` (if the underlying I/O type is
/// `Sync`), the caller must ensure that there are at most two tasks that use a
-/// `PollEvented` instance concurrenty. One for reading and one for writing.
+/// `PollEvented` instance concurrently. One for reading and one for writing.
/// While violating this requirement is "safe" from a Rust memory model point of
/// view, it will result in unexpected behavior in the form of lost
/// notifications and tasks hanging.
@@ -50,7 +50,7 @@ use std::sync::atomic::Ordering::Relaxed;
/// [`clear_write_ready`]. This clears the readiness state until a new readiness
/// event is received.
///
-/// This allows the caller to implement additional funcitons. For example,
+/// This allows the caller to implement additional functions. For example,
/// [`TcpListener`] implements poll_accept by using [`poll_read_ready`] and
/// [`clear_write_ready`].
///
diff --git a/tokio-reactor/src/registration.rs b/tokio-reactor/src/registration.rs
index 84040633..73298f9a 100644
--- a/tokio-reactor/src/registration.rs
+++ b/tokio-reactor/src/registration.rs
@@ -120,7 +120,7 @@ impl Registration {
self.register2(io, || Handle::try_current())
}
- /// Deregister the I/O resource from the reactor it is associatd with.
+ /// Deregister the I/O resource from the reactor it is associated with.
///
/// This function must be called before the I/O resource associated with the
/// registration is dropped.
diff --git a/tokio-tcp/src/listener.rs b/tokio-tcp/src/listener.rs
index 0609d5a4..e96b7f06 100644
--- a/tokio-tcp/src/listener.rs
+++ b/tokio-tcp/src/listener.rs
@@ -96,7 +96,7 @@ impl TcpListener {
///
/// This function is the same as `accept` above except that it returns a
/// `std::net::TcpStream` instead of a `tokio::net::TcpStream`. This in turn
- /// can then allow for the TCP stream to be assoiated with a different
+ /// can then allow for the TCP stream to be associated with a different
/// reactor than the one this `TcpListener` is associated with.
///
/// # Return
diff --git a/tokio-threadpool/src/blocking.rs b/tokio-threadpool/src/blocking.rs
index c78d25d9..c224f9e0 100644
--- a/tokio-threadpool/src/blocking.rs
+++ b/tokio-threadpool/src/blocking.rs
@@ -62,7 +62,7 @@ pub struct BlockingError {
/// ideal as it requires bidirectional message passing as well as a channel to
/// communicate which adds a level of buffering.
///
-/// Instead, `blocking` hands off the responsiblity of processing the work queue
+/// Instead, `blocking` hands off the responsibility of processing the work queue
/// to another thread. This hand off is light compared to a channel and does not
/// require buffering.
///
diff --git a/tokio-threadpool/src/builder.rs b/tokio-threadpool/src/builder.rs
index 6f09c275..985f55a1 100644
--- a/tokio-threadpool/src/builder.rs
+++ b/tokio-threadpool/src/builder.rs
@@ -372,7 +372,7 @@ impl Builder {
/// let park = DefaultPark::new();
///
/// // Decorate the `park` instance, allowing us to customize work
- /// // that happens when a worker therad goes to sleep.
+ /// // that happens when a worker thread goes to sleep.
/// decorate(park)
/// })
/// .build();
diff --git a/tokio-threadpool/src/park/default_park.rs b/tokio-threadpool/src/park/default_park.rs
index 73e98b0e..08dc5913 100644
--- a/tokio-threadpool/src/park/default_park.rs
+++ b/tokio-threadpool/src/park/default_park.rs
@@ -133,7 +133,7 @@ impl Inner {
None => self.condvar.wait(m).unwrap(),
};
- // Transition back to idle. If the state has transitione dto `NOTIFY`,
+ // Transition back to idle. If the state has transitions dto `NOTIFY`,
// this will consume that notification
self.state.store(IDLE, SeqCst);
diff --git a/tokio-threadpool/src/pool/backup_stack.rs b/tokio-threadpool/src/pool/backup_stack.rs
index b2a54d64..c330a036 100644
--- a/tokio-threadpool/src/pool/backup_stack.rs
+++ b/tokio-threadpool/src/pool/backup_stack.rs
@@ -46,7 +46,7 @@ impl BackupStack {
/// Returns `Ok` on success.
///
/// Returns `Err` if the pool has transitioned to the `TERMINATED` state.
- /// Whene terminated, pushing new entries is no longer permitted.
+ /// When terminated, pushing new entries is no longer permitted.
pub fn push(&self, entries: &[Backup], id: BackupId) -> Result<(), ()> {
let mut state: State = self.state.load(Acquire).into();
diff --git a/tokio-threadpool/src/task/blocking.rs b/tokio-threadpool/src/task/blocking.rs
index ff32b5ab..62eef5d9 100644
--- a/tokio-threadpool/src/task/blocking.rs
+++ b/tokio-threadpool/src/task/blocking.rs
@@ -363,7 +363,7 @@ impl Blocking {
debug_assert!(State::from(state).is_ptr());
if state != tail as usize {
- // Try aain
+ // Try again
thread::yield_now();
continue 'outer;
}
@@ -438,7 +438,7 @@ impl State {
true
}
- /// Add blockin capacity.
+ /// Add blocking capacity.
fn add_capacity(&mut self, capacity: usize, stub: &Task) -> bool {
debug_assert!(capacity > 0);
diff --git a/tokio-threadpool/src/worker/mod.rs b/tokio-threadpool/src/worker/mod.rs
index d5a14662..775dafcd 100644
--- a/tokio-threadpool/src/worker/mod.rs
+++ b/tokio-threadpool/src/worker/mod.rs
@@ -227,7 +227,7 @@ impl Worker {
while self.check_run_state(first) {
first = false;
- // Poll inbound until empty, transfering all tasks to the internal
+ // Poll inbound until empty, transferring all tasks to the internal
// queue.
let consistent = self.drain_inbound();
diff --git a/tokio-threadpool/src/worker/stack.rs b/tokio-threadpool/src/worker/stack.rs
index 9e0e7c9b..19245780 100644
--- a/tokio-threadpool/src/worker/stack.rs
+++ b/tokio-threadpool/src/worker/stack.rs
@@ -71,7 +71,7 @@ impl Stack {
/// Returns `Ok` on success.
///
/// Returns `Err` if the pool has transitioned to the `TERMINATED` state.
- /// Whene terminated, pushing new entries is no longer permitted.
+ /// When terminated, pushing new entries is no longer permitted.
pub fn push(&self, entries: &[worker::Entry], idx: usize) -> Result<(), ()> {
let mut state: State = self.state.load(Acquire).into();
@@ -105,7 +105,7 @@ impl Stack {
///
/// If `terminate` is set and the stack is empty when this function is
/// called, the state of the stack is transitioned to "terminated". At this
- /// point, no further workers can be pusheed onto the stack.
+ /// point, no further workers can be pushed onto the stack.
///
/// # Return
///
diff --git a/tokio-threadpool/tests/blocking.rs b/tokio-threadpool/tests/blocking.rs
index e9de847d..b87417b1 100644
--- a/tokio-threadpool/tests/blocking.rs
+++ b/tokio-threadpool/tests/blocking.rs
@@ -238,7 +238,7 @@ fn blocking_thread_does_not_take_over_shutdown_worker_thread() {
}
#[test]
-fn blockin_one_time_gets_capacity_for_multiple_blocks() {
+fn blocking_one_time_gets_capacity_for_multiple_blocks() {
const ITER: usize = 1;
const BLOCKING: usize = 2;
diff --git a/tokio-timer/src/timer/entry.rs b/tokio-timer/src/timer/entry.rs
index 2dd6845a..3cea9fe6 100644
--- a/tokio-timer/src/timer/entry.rs
+++ b/tokio-timer/src/timer/entry.rs
@@ -44,7 +44,7 @@ pub(crate) struct Entry {
/// instant, this value is changed.
state: AtomicU64,
- /// When true, the entry is counted by `Inner` towards the max oustanding
+ /// When true, the entry is counted by `Inner` towards the max outstanding
/// timeouts. The drop fn uses this to know if it should decrement the
/// counter.
///
@@ -54,7 +54,7 @@ pub(crate) struct Entry {
/// improve the struct layout. To do this, we must always allocate the node.
counted: bool,
- /// True wheen the entry is queued in the "process" stack. This value
+ /// True when the entry is queued in the "process" stack. This value
/// is set before pushing the value and unset after popping the value.
queued: AtomicBool,
diff --git a/tokio-timer/src/timer/mod.rs b/tokio-timer/src/timer/mod.rs
index 89c5eb25..60b1f0f8 100644
--- a/tokio-timer/src/timer/mod.rs
+++ b/tokio-timer/src/timer/mod.rs
@@ -320,7 +320,7 @@ where T: Park,
break;
}
- // Prcess the slot, either moving it down a level or firing the
+ // Process the slot, either moving it down a level or firing the
// timeout if currently at the final (boss) level.
self.process_expiration(&expiration);
diff --git a/tokio-timer/src/timer/registration.rs b/tokio-timer/src/timer/registration.rs
index a89d0f67..8df21aba 100644
--- a/tokio-timer/src/timer/registration.rs
+++ b/tokio-timer/src/timer/registration.rs
@@ -40,7 +40,7 @@ impl Registration {
let when = inner.normalize_deadline(deadline);
if when <= inner.elapsed() {
- // The deadline has already elapsed, ther eis no point creating the
+ // The deadline has already elapsed, there is no point creating the
// structures.
return Registration {
entry: Arc::new(Entry::new_elapsed(handle)),
diff --git a/tokio-timer/tests/delay.rs b/tokio-timer/tests/delay.rs
index 09181619..02ac28a6 100644
--- a/tokio-timer/tests/delay.rs
+++ b/tokio-timer/tests/delay.rs
@@ -259,7 +259,7 @@ fn short_delay() {
// The delay has not elapsed.
assert_not_ready!(delay);
- // Turn the timer, but not enough timee will go by.
+ // Turn the timer, but not enough time will go by.
turn(timer, None);
// The delay has elapsed.
diff --git a/tokio-udp/src/frame.rs b/tokio-udp/src/frame.rs
index f3d8e0b2..83e204d8 100644
--- a/tokio-udp/src/frame.rs
+++ b/tokio-udp/src/frame.rs
@@ -114,7 +114,7 @@ const INITIAL_WR_CAPACITY: usize = 8 * 1024;
impl<C> UdpFramed<C> {
/// Create a new `UdpFramed` backed by the given socket and codec.
///
- /// See struct level documention for more details.
+ /// See struct level documentation for more details.
pub fn new(socket: UdpSocket, codec: C) -> UdpFramed<C> {
UdpFramed {
socket: socket,
diff --git a/tokio-udp/src/lib.rs b/tokio-udp/src/lib.rs
index bf7bd28f..b5f4abcf 100644
--- a/tokio-udp/src/lib.rs
+++ b/tokio-udp/src/lib.rs
@@ -7,7 +7,7 @@
//! Reading and writing to it can be done using futures, which return the
//! [`RecvDgram`] and [`SendDgram`] structs respectively.
//!
-//! For convience it's also possible to convert raw datagrams into higher-level
+//! For convenience it's also possible to convert raw datagrams into higher-level
//! frames.
//!
//! [`UdpSocket`]: struct.UdpSocket.html