Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jtescher committed Jan 22, 2017
1 parent f685e79 commit dde2320
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,13 @@ impl<T> fmt::Display for SendError<T> {

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)
}
}

Expand All @@ -380,7 +380,7 @@ fn format_send_error<T>(e: &SendError<T>, f: &mut fmt::Formatter) -> fmt::Result
}

#[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"),
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sys::unix::io::set_cloexec;

/// 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;
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix/kqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use sys::unix::io::set_cloexec;

/// 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;
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub use self::uds::UnixSocket;
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);

Expand Down
4 changes: 2 additions & 2 deletions src/sys/windows/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use {Token, PollOpt};

/// 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;
Expand Down Expand Up @@ -165,7 +165,7 @@ impl Binding {
/// 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
Expand Down
6 changes: 3 additions & 3 deletions src/sys/windows/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,13 @@ impl StreamImp {
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
Expand Down
2 changes: 1 addition & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct Builder {
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,
}

Expand Down
2 changes: 1 addition & 1 deletion test/test_unix_echo_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl EchoServer {
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);
Expand Down
2 changes: 1 addition & 1 deletion test/test_unix_pass_fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl EchoServer {
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);
Expand Down

0 comments on commit dde2320

Please sign in to comment.