Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tokio to Rust 2018 #1082

Merged
merged 46 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
50dab6f
async-await: replace std await! macro with await syntax
taiki-e May 9, 2019
91c69db
buf, io: update to Rust 2018
carllerche May 9, 2019
429851f
io: fix tests
carllerche May 9, 2019
cd260eb
sync: update to Rust 2018
carllerche May 9, 2019
9acaec4
executor: update to Rust 2018
carllerche May 9, 2019
ec682c5
reactor: update to Rust 2018
carllerche May 9, 2019
72a09e0
macros: tweaks
carllerche May 9, 2019
4f771a6
async-await: replace std_await! macro with await syntax
taiki-e May 9, 2019
29da8ac
codec: update to Rust 2018
carllerche May 9, 2019
908304c
current-thread: update to Rust 2018
carllerche May 9, 2019
4de9e11
threadpool: update to Rust 2018
carllerche May 9, 2019
6bd15b7
async-await: rename tokio::await! to async_wait!
taiki-e May 9, 2019
4d12639
all: update Cargo.toml versions + disable push
carllerche May 9, 2019
bf9c201
update dep versions in Cargo.toml files
carllerche May 9, 2019
df9a87f
fs: update to Rust 2018
carllerche May 10, 2019
d387ae7
Merge remote-tracking branch 'taiki-e/await' into rust-2018
carllerche May 10, 2019
7e9217f
futures: update to Rust 2018
carllerche May 10, 2019
3416d87
signal: update to Rust 2018
carllerche May 10, 2019
a19c118
tcp: update to Rust 2018
carllerche May 10, 2019
73ab0ef
timer: update to Rust 2018
carllerche May 10, 2019
6e68380
test: update to Rust 2018
carllerche May 10, 2019
814d876
tls: update to Rust 2018
carllerche May 10, 2019
95b8eee
udp: update to Rust 2018
carllerche May 10, 2019
05d348a
uds: update to Rust 2018
carllerche May 10, 2019
d2040b3
tokio: update to Rust 2018
carllerche May 10, 2019
d8a0b1f
fmt
carllerche May 10, 2019
55f7c74
fmt
carllerche May 10, 2019
611ade4
windows fixes
carllerche May 10, 2019
7cf9f86
linux fix
carllerche May 10, 2019
2a32934
misc ci fixes
carllerche May 10, 2019
6641f6c
misc fixes
carllerche May 10, 2019
0a12f4b
More fixes
carllerche May 10, 2019
778f9a0
win fix
carllerche May 10, 2019
3ea50d2
win fix
carllerche May 10, 2019
dbf3e3b
tsan whitelist
carllerche May 10, 2019
c33584d
more tsan whitelist
carllerche May 10, 2019
cd59434
Update tokio-signal/src/windows.rs
carllerche May 10, 2019
c84c285
Deny rust_2018_idioms for tokio doc tests
carllerche May 10, 2019
1505f8d
Work on updating docs
carllerche May 10, 2019
b3ffa7f
fs, io: update doc examples
carllerche May 10, 2019
2628120
more doc fixes
carllerche May 10, 2019
d6ed92e
more doc fixes
carllerche May 10, 2019
360ee74
hopefully all doc tests are updated
carllerche May 10, 2019
395b884
fmt
carllerche May 10, 2019
5152abb
Fix examples
carllerche May 10, 2019
ca8fa97
fix docs
carllerche May 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
codec: update to Rust 2018
  • Loading branch information
carllerche committed May 9, 2019
commit 29da8acf5c9c2a013a0776276a0bb9325ac6ebc6
1 change: 1 addition & 0 deletions tokio-codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name = "tokio-codec"
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.1.1"
edition = "2018"
authors = ["Carl Lerche <me@carllerche.com>", "Bryan Burgers <bryan@burgers.io>"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
Expand Down
2 changes: 1 addition & 1 deletion tokio-codec/src/bytes_codec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bytes::{BufMut, Bytes, BytesMut};
use std::io;
use tokio_io::_tokio_codec::{Decoder, Encoder};
use std::io;

/// A simple `Codec` implementation that just ships bytes around.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
Expand Down
11 changes: 4 additions & 7 deletions tokio-codec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![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))]

//! Utilities for encoding and decoding frames.
//!
Expand All @@ -13,13 +14,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;
2 changes: 1 addition & 1 deletion tokio-codec/src/lines_codec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bytes::{BufMut, BytesMut};
use std::{cmp, io, str, usize};
use tokio_io::_tokio_codec::{Decoder, Encoder};
use std::{cmp, io, str, usize};

/// A simple `Codec` implementation that splits up data into lines.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
Expand Down
3 changes: 1 addition & 2 deletions tokio-codec/tests/codecs.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
7 changes: 2 additions & 5 deletions tokio-codec/tests/framed.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
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};
use std::io::{self, Read};
use tokio_codec::{Decoder, Encoder, Framed, FramedParts};
use tokio_io::AsyncRead;
use std::io::{self, Read};

const INITIAL_CAPACITY: usize = 8 * 1024;

Expand Down
11 changes: 3 additions & 8 deletions tokio-codec/tests/framed_read.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
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 tokio_codec::{Decoder, FramedRead};
use tokio_io::AsyncRead;
use std::collections::VecDeque;
use std::io::{self, Read};

Expand Down
11 changes: 3 additions & 8 deletions tokio-codec/tests/framed_write.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
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 tokio_codec::{Encoder, FramedWrite};
use tokio_io::AsyncWrite;
use std::collections::VecDeque;
use std::io::{self, Write};

Expand Down