async-await: misc fixes and typos (#585)

This commit is contained in:
Carl Lerche
2018-08-27 15:16:32 -07:00
committed by GitHub
parent b479ce78d3
commit d16032cf06
5 changed files with 10 additions and 18 deletions
+3 -11
View File
@@ -6,12 +6,12 @@ edition = "2018"
# When releasing to crates.io: # When releasing to crates.io:
# - Update html_root_url. # - Update html_root_url.
version = "0.1.0" version = "0.1.1"
authors = ["Carl Lerche <[email protected]>"] authors = ["Carl Lerche <[email protected]>"]
license = "MIT" license = "MIT"
repository = "https://github.com/tokio-rs/tokio" repository = "https://github.com/tokio-rs/tokio"
homepage = "https://tokio.rs" homepage = "https://tokio.rs"
documentation = "https://docs.rs/tokio-async-await/0.1.0" documentation = "https://docs.rs/tokio-async-await/0.1.1"
description = """ description = """
Experimental async/await support for Tokio Experimental async/await support for Tokio
""" """
@@ -24,7 +24,7 @@ name = "tokio"
[dependencies] [dependencies]
futures = "0.1.23" futures = "0.1.23"
tokio_main = { package = "tokio", version = "0.1.7", path = ".." } tokio = { version = "0.1.7", path = ".." }
tokio-io = { version = "0.1.7", path = "../tokio-io" } tokio-io = { version = "0.1.7", path = "../tokio-io" }
tokio-channel = { version = "0.1.0", path = "../tokio-channel", features = ["async-await-preview"] } tokio-channel = { version = "0.1.0", path = "../tokio-channel", features = ["async-await-preview"] }
tokio-reactor = { version = "0.1.5", path = "../tokio-reactor", features = ["async-await-preview"] } tokio-reactor = { version = "0.1.5", path = "../tokio-reactor", features = ["async-await-preview"] }
@@ -35,11 +35,3 @@ futures-util-preview = { version = "0.3.0-alpha.2" }
bytes = "0.4.9" bytes = "0.4.9"
tokio-codec = { version = "0.1.0", path = "../tokio-codec" } tokio-codec = { version = "0.1.0", path = "../tokio-codec" }
hyper = "0.12.8" hyper = "0.12.8"
[patch.crates-io]
tokio = { path = "../" }
tokio-executor = { path = "../tokio-executor" }
tokio-io = { path = "../tokio-io" }
tokio-reactor = { path = "../tokio-reactor" }
tokio-tcp = { path = "../tokio-tcp" }
tokio-timer = { path = "../tokio-timer" }
+2 -2
View File
@@ -4,11 +4,11 @@ This crate provides a preview of Tokio with async / await support. It is a shim
layer on top of `tokio`. layer on top of `tokio`.
**This crate requires Rust nightly and does not provide API stability **This crate requires Rust nightly and does not provide API stability
guarantees. You are living on the here.** guarantees. You are living on the edge here.**
## Usage ## Usage
To use this crate, you need need to start with a Rust 2018 edition crate. To use this crate, you need to start with a Rust 2018 edition crate.
Add this to your `Cargo.toml`: Add this to your `Cargo.toml`:
@@ -27,7 +27,7 @@ impl<T> Compat<T> {
} }
} }
/// Convert a valuee into one that can be used with `await!`. /// Convert a value into one that can be used with `await!`.
pub trait IntoAwaitable { pub trait IntoAwaitable {
type Awaitable; type Awaitable;
+2 -2
View File
@@ -16,8 +16,8 @@ use tokio_io::{AsyncRead, AsyncWrite};
/// An extension trait which adds utility methods to `AsyncRead` types. /// An extension trait which adds utility methods to `AsyncRead` types.
pub trait AsyncReadExt: AsyncRead { pub trait AsyncReadExt: AsyncRead {
/// Tries to read some bytes directly into the given `buf` in asynchronous /// Tries to read some bytes directly into the given `buf` in an
/// manner, returning a future. /// asynchronous manner, returning a future.
/// ///
/// The returned future will resolve to the number of bytes read once the read /// The returned future will resolve to the number of bytes read once the read
/// operation is completed. /// operation is completed.
+2 -2
View File
@@ -11,7 +11,7 @@ extern crate futures_core;
extern crate futures_util; extern crate futures_util;
// Re-export all of Tokio // Re-export all of Tokio
pub use tokio_main::{ pub use tokio::{
// Modules // Modules
clock, clock,
codec, codec,
@@ -53,7 +53,7 @@ pub mod prelude {
//! //!
//! The prelude may grow over time as additional items see ubiquitous use. //! The prelude may grow over time as additional items see ubiquitous use.
pub use tokio_main::prelude::*; pub use tokio::prelude::*;
#[doc(inline)] #[doc(inline)]
pub use crate::async_await::{ pub use crate::async_await::{