mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
async-await: misc fixes and typos (#585)
This commit is contained in:
@@ -6,12 +6,12 @@ edition = "2018"
|
||||
|
||||
# When releasing to crates.io:
|
||||
# - Update html_root_url.
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = ["Carl Lerche <[email protected]>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/tokio-rs/tokio"
|
||||
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 = """
|
||||
Experimental async/await support for Tokio
|
||||
"""
|
||||
@@ -24,7 +24,7 @@ name = "tokio"
|
||||
|
||||
[dependencies]
|
||||
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-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"] }
|
||||
@@ -35,11 +35,3 @@ futures-util-preview = { version = "0.3.0-alpha.2" }
|
||||
bytes = "0.4.9"
|
||||
tokio-codec = { version = "0.1.0", path = "../tokio-codec" }
|
||||
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" }
|
||||
|
||||
@@ -4,11 +4,11 @@ This crate provides a preview of Tokio with async / await support. It is a shim
|
||||
layer on top of `tokio`.
|
||||
|
||||
**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
|
||||
|
||||
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`:
|
||||
|
||||
|
||||
@@ -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 {
|
||||
type Awaitable;
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ use tokio_io::{AsyncRead, AsyncWrite};
|
||||
|
||||
/// An extension trait which adds utility methods to `AsyncRead` types.
|
||||
pub trait AsyncReadExt: AsyncRead {
|
||||
/// Tries to read some bytes directly into the given `buf` in asynchronous
|
||||
/// manner, returning a future.
|
||||
/// Tries to read some bytes directly into the given `buf` in an
|
||||
/// asynchronous manner, returning a future.
|
||||
///
|
||||
/// The returned future will resolve to the number of bytes read once the read
|
||||
/// operation is completed.
|
||||
|
||||
@@ -11,7 +11,7 @@ extern crate futures_core;
|
||||
extern crate futures_util;
|
||||
|
||||
// Re-export all of Tokio
|
||||
pub use tokio_main::{
|
||||
pub use tokio::{
|
||||
// Modules
|
||||
clock,
|
||||
codec,
|
||||
@@ -53,7 +53,7 @@ pub mod prelude {
|
||||
//!
|
||||
//! The prelude may grow over time as additional items see ubiquitous use.
|
||||
|
||||
pub use tokio_main::prelude::*;
|
||||
pub use tokio::prelude::*;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use crate::async_await::{
|
||||
|
||||
Reference in New Issue
Block a user