Fix typos
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f69e54c..e156eff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -47,7 +47,7 @@
* The `UdpSocket::{send_to, recv_from}` methods are no longer generic over `Buf`
or `MutBuf` but instead take slices directly. The return types have also been
updated to return the number of bytes transferred. (#260)
-* Fix bug with kqueue wher ean error on registration prevented the
+* Fix bug with kqueue where an error on registration prevented the
changelist from getting flushed (#276)
* Support sending/receiving FDs over UNIX sockets (#291)
* Mio's socket types are permanently associated with an EventLoop (#308)
diff --git a/src/channel.rs b/src/channel.rs
index 3492b73..1b54867 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -361,13 +361,13 @@
impl<T> fmt::Debug for TrySendError<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- format_try_send_errror(self, f)
+ format_try_send_error(self, f)
}
}
impl<T> fmt::Display for TrySendError<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- format_try_send_errror(self, f)
+ format_try_send_error(self, f)
}
}
@@ -380,7 +380,7 @@
}
#[inline]
-fn format_try_send_errror<T>(e: &TrySendError<T>, f: &mut fmt::Formatter) -> fmt::Result {
+fn format_try_send_error<T>(e: &TrySendError<T>, f: &mut fmt::Formatter) -> fmt::Result {
match e {
&TrySendError::Io(ref io_err) => write!(f, "{}", io_err),
&TrySendError::Full(..) => write!(f, "Full"),
diff --git a/src/sys/unix/epoll.rs b/src/sys/unix/epoll.rs
index f178bf1..2add0e4 100644
--- a/src/sys/unix/epoll.rs
+++ b/src/sys/unix/epoll.rs
@@ -15,7 +15,7 @@
/// Each Selector has a globally unique(ish) ID associated with it. This ID
/// gets tracked by `TcpStream`, `TcpListener`, etc... when they are first
-/// registered with the `Selector`. If a type that is previously associatd with
+/// registered with the `Selector`. If a type that is previously associated with
/// a `Selector` attempts to register itself with a different `Selector`, the
/// operation will return with an error. This matches windows behavior.
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
diff --git a/src/sys/unix/kqueue.rs b/src/sys/unix/kqueue.rs
index 14f3836..0ad590d 100644
--- a/src/sys/unix/kqueue.rs
+++ b/src/sys/unix/kqueue.rs
@@ -14,7 +14,7 @@
/// Each Selector has a globally unique(ish) ID associated with it. This ID
/// gets tracked by `TcpStream`, `TcpListener`, etc... when they are first
-/// registered with the `Selector`. If a type that is previously associatd with
+/// registered with the `Selector`. If a type that is previously associated with
/// a `Selector` attempts to register itself with a different `Selector`, the
/// operation will return with an error. This matches windows behavior.
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
diff --git a/src/sys/unix/mod.rs b/src/sys/unix/mod.rs
index 6644d23..59ca4d9 100644
--- a/src/sys/unix/mod.rs
+++ b/src/sys/unix/mod.rs
@@ -38,7 +38,7 @@
use std::os::unix::io::FromRawFd;
pub fn pipe() -> ::io::Result<(Io, Io)> {
- // Use pipe2 for atomically seetting O_CLOEXEC if we can, but otherwise
+ // Use pipe2 for atomically setting O_CLOEXEC if we can, but otherwise
// just fall back to using `pipe`.
dlsym!(fn pipe2(*mut c_int, c_int) -> c_int);
diff --git a/src/sys/windows/selector.rs b/src/sys/windows/selector.rs
index 35333cc..d1f35d9 100644
--- a/src/sys/windows/selector.rs
+++ b/src/sys/windows/selector.rs
@@ -19,7 +19,7 @@
/// Each Selector has a globally unique(ish) ID associated with it. This ID
/// gets tracked by `TcpStream`, `TcpListener`, etc... when they are first
-/// registered with the `Selector`. If a type that is previously associatd with
+/// registered with the `Selector`. If a type that is previously associated with
/// a `Selector` attempts to register itself with a different `Selector`, the
/// operation will return with an error. This matches windows behavior.
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
@@ -165,7 +165,7 @@
/// This function is intended to be used as part of `Evented::register` for
/// custom IOCP objects. It will add the specified handle to the internal
/// IOCP object with the provided `token`. All future events generated by
- /// the handled provided will be recieved by the `Poll`'s internal IOCP
+ /// the handled provided will be received by the `Poll`'s internal IOCP
/// object.
///
/// # Unsafety
diff --git a/src/sys/windows/tcp.rs b/src/sys/windows/tcp.rs
index e6cbb5c..09912a3 100644
--- a/src/sys/windows/tcp.rs
+++ b/src/sys/windows/tcp.rs
@@ -403,13 +403,13 @@
self.inner.socket.write_overlapped(&buf[pos..], self.inner.write.as_mut_ptr())
};
match ret {
- Ok(Some(transfered_bytes)) if me.instant_notify => {
- if transfered_bytes == buf.len() - pos {
+ Ok(Some(transferred_bytes)) if me.instant_notify => {
+ if transferred_bytes == buf.len() - pos {
self.add_readiness(me, Ready::writable());
me.write = State::Empty;
break;
}
- pos += transfered_bytes;
+ pos += transferred_bytes;
}
Ok(_) => {
// see docs above on StreamImp.inner for rationale on forget
diff --git a/src/timer.rs b/src/timer.rs
index 3aac6a5..abe3477 100644
--- a/src/timer.rs
+++ b/src/timer.rs
@@ -42,7 +42,7 @@
pub struct Timeout {
// Reference into the timer entry slab
token: Token,
- // Tick that it should matchup with
+ // Tick that it should match up with
tick: u64,
}
diff --git a/test/test_unix_echo_server.rs b/test/test_unix_echo_server.rs
index aef2ba3..3e14914 100644
--- a/test/test_unix_echo_server.rs
+++ b/test/test_unix_echo_server.rs
@@ -97,7 +97,7 @@
let sock = self.sock.accept().unwrap();
let conn = EchoConn::new(sock);
let tok = self.conns.insert(conn)
- .ok().expect("could not add connectiont o slab");
+ .ok().expect("could not add connection to slab");
// Register the connection
self.conns[tok].token = Some(tok);
diff --git a/test/test_unix_pass_fd.rs b/test/test_unix_pass_fd.rs
index a4c0078..77bd233 100644
--- a/test/test_unix_pass_fd.rs
+++ b/test/test_unix_pass_fd.rs
@@ -108,7 +108,7 @@
let sock = self.sock.accept().unwrap();
let conn = EchoConn::new(sock);
let tok = self.conns.insert(conn)
- .ok().expect("could not add connectiont o slab");
+ .ok().expect("could not add connection to slab");
// Register the connection
self.conns[tok].token = Some(tok);