mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
docs: fix some typos
This commit is contained in:
+1
-1
@@ -137,7 +137,7 @@ impl UdpSocket {
|
||||
/// Sends data on the socket to the given address. On success, returns the
|
||||
/// number of bytes written.
|
||||
///
|
||||
/// Address type can be any implementor of `ToSocketAddrs` trait. See its
|
||||
/// Address type can be any implementer of `ToSocketAddrs` trait. See its
|
||||
/// documentation for concrete examples.
|
||||
pub fn send_to(&self, buf: &[u8], target: &SocketAddr) -> io::Result<usize> {
|
||||
if let Async::NotReady = self.io.poll_write() {
|
||||
|
||||
@@ -45,7 +45,7 @@ use reactor::io_token::IoToken;
|
||||
///
|
||||
/// ## Readiness to read/write
|
||||
///
|
||||
/// A `PollEvented` allows listenting and waiting for an arbitrary `mio::Ready`
|
||||
/// A `PollEvented` allows listening and waiting for an arbitrary `mio::Ready`
|
||||
/// instance, including the platform-specific contents of `mio::Ready`. At most
|
||||
/// two future tasks, however, can be waiting on a `PollEvented`. The
|
||||
/// `need_read` and `need_write` methods can block two separate tasks, one on
|
||||
@@ -99,7 +99,7 @@ impl<E: Evented> PollEvented<E> {
|
||||
/// object with the event loop that the `handle` provided points to.
|
||||
/// Typically this method is not required as this automatically happens when
|
||||
/// `E` is dropped, but for some use cases the `E` object doesn't represent
|
||||
/// an owned reference, so dropping it won't automatically unreigster with
|
||||
/// an owned reference, so dropping it won't automatically unregister with
|
||||
/// the event loop.
|
||||
///
|
||||
/// This consumes `self` as it will no longer provide events after the
|
||||
|
||||
@@ -51,7 +51,7 @@ impl Timeout {
|
||||
/// specified by `at`.
|
||||
///
|
||||
/// This method is usable even of this instance of `Timeout` has "already
|
||||
/// fired". That is, if this future has resovled, calling this method means
|
||||
/// fired". That is, if this future has resolved, calling this method means
|
||||
/// that the future will still re-resolve at the specified instant.
|
||||
///
|
||||
/// If `at` is in the past then this future will immediately be resolved
|
||||
@@ -59,7 +59,7 @@ impl Timeout {
|
||||
///
|
||||
/// Note that if any task is currently blocked on this future then that task
|
||||
/// will be dropped. It is required to call `poll` again after this method
|
||||
/// has been called to ensure tha ta task is blocked on this future.
|
||||
/// has been called to ensure that a task is blocked on this future.
|
||||
pub fn reset(&mut self, at: Instant) {
|
||||
self.when = at;
|
||||
self.token.reset_timeout(self.when, &self.handle);
|
||||
|
||||
Reference in New Issue
Block a user