Update Tokio to Rust 2018 (#1082)

This commit is contained in:
Carl Lerche
2019-05-14 10:27:36 -07:00
committed by GitHub
parent 79d8820050
commit cb4aea394e
343 changed files with 1725 additions and 2813 deletions
+5 -3
View File
@@ -7,8 +7,9 @@ name = "tokio-codec"
# - Cargo.toml
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.1.1"
# - Create "v0.2.x" git tag.
version = "0.2.0"
edition = "2018"
authors = ["Carl Lerche <[email protected]>", "Bryan Burgers <[email protected]>"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
@@ -18,8 +19,9 @@ description = """
Utilities for encoding and decoding frames.
"""
categories = ["asynchronous"]
publish = false
[dependencies]
tokio-io = "0.1.7"
tokio-io = { version = "0.2.0", path = "../tokio-io" }
bytes = "0.4.7"
futures = "0.1.18"
-15
View File
@@ -4,21 +4,6 @@ Utilities for encoding and decoding frames.
[Documentation](https://docs.rs/tokio-codec)
## Usage
First, add this to your `Cargo.toml`:
```toml
[dependencies]
tokio-codec = "0.1"
```
Next, add this to your crate:
```rust
extern crate tokio_codec;
```
You can find extensive documentation and examples about how to use this crate
online at [https://tokio.rs](https://tokio.rs). The [API
documentation](https://docs.rs/tokio-codec) is also a great place to get started
+5 -7
View File
@@ -1,5 +1,7 @@
#![deny(missing_docs, missing_debug_implementations, warnings)]
#![doc(html_root_url = "https://docs.rs/tokio-codec/0.1.1")]
#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#![cfg_attr(test, deny(warnings))]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
//! Utilities for encoding and decoding frames.
//!
@@ -13,13 +15,9 @@
//! [`Stream`]: #
//! [transports]: #
extern crate bytes;
extern crate tokio_io;
mod bytes_codec;
mod lines_codec;
pub use crate::bytes_codec::BytesCodec;
pub use crate::lines_codec::LinesCodec;
pub use tokio_io::_tokio_codec::{Decoder, Encoder, Framed, FramedParts, FramedRead, FramedWrite};
pub use bytes_codec::BytesCodec;
pub use lines_codec::LinesCodec;
+1 -2
View File
@@ -1,5 +1,4 @@
extern crate bytes;
extern crate tokio_codec;
#![deny(warnings, rust_2018_idioms)]
use bytes::{BufMut, Bytes, BytesMut};
use tokio_codec::{BytesCodec, Decoder, Encoder, LinesCodec};
+1 -4
View File
@@ -1,7 +1,4 @@
extern crate bytes;
extern crate futures;
extern crate tokio_codec;
extern crate tokio_io;
#![deny(warnings, rust_2018_idioms)]
use bytes::{Buf, BufMut, BytesMut, IntoBuf};
use futures::{Future, Stream};
+3 -8
View File
@@ -1,17 +1,12 @@
extern crate bytes;
extern crate futures;
extern crate tokio_codec;
extern crate tokio_io;
use tokio_codec::{Decoder, FramedRead};
use tokio_io::AsyncRead;
#![deny(warnings, rust_2018_idioms)]
use bytes::{Buf, BytesMut, IntoBuf};
use futures::Async::{NotReady, Ready};
use futures::Stream;
use std::collections::VecDeque;
use std::io::{self, Read};
use tokio_codec::{Decoder, FramedRead};
use tokio_io::AsyncRead;
macro_rules! mock {
($($x:expr,)*) => {{
+3 -8
View File
@@ -1,16 +1,11 @@
extern crate bytes;
extern crate futures;
extern crate tokio_codec;
extern crate tokio_io;
use tokio_codec::{Encoder, FramedWrite};
use tokio_io::AsyncWrite;
#![deny(warnings, rust_2018_idioms)]
use bytes::{BufMut, BytesMut};
use futures::{Poll, Sink};
use std::collections::VecDeque;
use std::io::{self, Write};
use tokio_codec::{Encoder, FramedWrite};
use tokio_io::AsyncWrite;
macro_rules! mock {
($($x:expr,)*) => {{