mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
chore: bump to newer nightly (#1485)
This commit is contained in:
parent
7e7a5147a3
commit
a791f4a758
@ -14,7 +14,7 @@ task:
|
||||
- pkg install -y curl
|
||||
- curl https://sh.rustup.rs -sSf --output rustup.sh
|
||||
# TODO: switch back to nightly
|
||||
- sh rustup.sh -y --default-toolchain nightly-2019-08-10
|
||||
- sh rustup.sh -y --default-toolchain nightly-2019-08-21
|
||||
- . $HOME/.cargo/env
|
||||
- rustup target add i686-unknown-freebsd
|
||||
- |
|
||||
|
@ -55,8 +55,6 @@ an asynchronous application.
|
||||
A basic TCP echo server with Tokio:
|
||||
|
||||
```rust
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::prelude::*;
|
||||
|
||||
|
@ -2,7 +2,7 @@ trigger: ["master", "std-future"]
|
||||
pr: ["master", "std-future"]
|
||||
|
||||
variables:
|
||||
nightly: nightly-2019-08-10
|
||||
nightly: nightly-2019-08-21
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
jobs:
|
||||
|
@ -1 +1 @@
|
||||
nightly-2019-08-10
|
||||
nightly-2019-08-21
|
||||
|
@ -39,8 +39,6 @@
|
||||
//! Specifically, given the following:
|
||||
//!
|
||||
//! ```
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio::codec::{Framed, LengthDelimitedCodec};
|
||||
//! use tokio::prelude::*;
|
||||
//!
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio::prelude::*;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio::prelude::*;
|
||||
|
@ -49,8 +49,6 @@ use std::pin::Pin;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::Executor;
|
||||
///
|
||||
/// # fn docs(my_executor: &mut dyn Executor) {
|
||||
@ -79,8 +77,6 @@ pub trait Executor {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::Executor;
|
||||
///
|
||||
/// # fn docs(my_executor: &mut dyn Executor) {
|
||||
@ -110,8 +106,6 @@ pub trait Executor {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::Executor;
|
||||
///
|
||||
/// # fn docs(my_executor: &mut dyn Executor) {
|
||||
|
@ -124,8 +124,6 @@ where
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// tokio::spawn(async {
|
||||
/// println!("running on the default executor");
|
||||
/// });
|
||||
|
@ -80,8 +80,6 @@ pub struct BlockingError {
|
||||
/// that needs to be performed.
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::threadpool::{ThreadPool, blocking};
|
||||
///
|
||||
/// use futures_util::future::poll_fn;
|
||||
|
@ -32,8 +32,6 @@ use std::time::Duration;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::threadpool::Builder;
|
||||
///
|
||||
/// use std::time::Duration;
|
||||
|
@ -59,8 +59,6 @@ impl Sender {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::threadpool::ThreadPool;
|
||||
///
|
||||
/// // Create a thread pool with default configuration values
|
||||
|
@ -51,8 +51,6 @@ impl ThreadPool {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio_executor::threadpool::ThreadPool;
|
||||
///
|
||||
/// // Create a thread pool with default configuration values
|
||||
|
@ -22,8 +22,6 @@ use crate::SpawnError;
|
||||
///
|
||||
/// [`spawn`]: TypedExecutor::spawn
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::executor::TypedExecutor;
|
||||
/// use tokio::sync::oneshot;
|
||||
///
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio::sync::oneshot;
|
||||
use tokio_executor::current_thread::{self, block_on_all, CurrentThread, TaskExecutor};
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
#[test]
|
||||
fn block_on_ready() {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_executor::{self, DefaultExecutor};
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_executor::park::{Park, Unpark};
|
||||
use tokio_executor::threadpool;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_executor::threadpool::*;
|
||||
use tokio_test::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_executor::threadpool::*;
|
||||
use tokio_sync::{mpsc, oneshot};
|
||||
|
@ -1,5 +1,4 @@
|
||||
//! Echo everything received on STDIN to STDOUT and STDERR.
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures_util::{FutureExt, SinkExt, StreamExt, TryFutureExt};
|
||||
|
||||
|
@ -32,8 +32,6 @@ use std::task::Poll;
|
||||
/// Create a new file and asynchronously write bytes to it:
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -47,8 +45,6 @@ use std::task::Poll;
|
||||
/// Read the contents of a file into a buffer
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -83,8 +79,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -127,8 +121,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -168,8 +160,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -196,8 +186,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -224,8 +212,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -255,8 +241,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -276,8 +260,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
@ -299,8 +281,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
@ -333,8 +313,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
@ -360,8 +338,6 @@ impl File {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs::File;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
|
@ -6,7 +6,6 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![feature(async_await)]
|
||||
|
||||
//! Asynchronous file and standard stream adaptation.
|
||||
//!
|
||||
|
@ -12,8 +12,6 @@ use std::{io, path::Path};
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
|
@ -93,8 +93,6 @@ impl DirEntry {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -128,8 +126,6 @@ impl DirEntry {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -161,8 +157,6 @@ impl DirEntry {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
@ -200,8 +194,6 @@ impl DirEntry {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
/// use tokio::prelude::*;
|
||||
///
|
||||
|
@ -12,8 +12,6 @@ use std::{io, path::Path};
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::fs;
|
||||
///
|
||||
/// # async fn dox() -> std::io::Result<()> {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures_util::future;
|
||||
use futures_util::try_stream::TryStreamExt;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use rand::{distributions, thread_rng, Rng};
|
||||
use std::fs;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use std::fs;
|
||||
use std::io::prelude::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::{AsyncRead, AsyncReadExt};
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures_util::StreamExt;
|
||||
use tokio_io::AsyncBufReadExt;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::{AsyncRead, AsyncReadExt};
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::AsyncReadExt;
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use std::io::Cursor;
|
||||
use tokio_io::AsyncBufReadExt;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::AsyncReadExt;
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::AsyncReadExt;
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::AsyncBufReadExt;
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::{AsyncWrite, AsyncWriteExt};
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_io::{AsyncWrite, AsyncWriteExt};
|
||||
use tokio_test::assert_ok;
|
||||
|
@ -26,8 +26,6 @@ use quote::quote;
|
||||
/// ### Select runtime
|
||||
///
|
||||
/// ```rust
|
||||
///#![feature(async_await)]
|
||||
///
|
||||
/// #[tokio::main(single_thread)]
|
||||
/// async fn main() {
|
||||
/// println!("Hello world");
|
||||
@ -36,8 +34,6 @@ use quote::quote;
|
||||
/// ### Using default
|
||||
///
|
||||
/// ```rust
|
||||
///#![feature(async_await)]
|
||||
///
|
||||
/// #[tokio::main]
|
||||
/// async fn main() {
|
||||
/// println!("Hello world");
|
||||
@ -116,8 +112,6 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// #[tokio::test]
|
||||
/// async fn my_test() {
|
||||
/// assert!(true);
|
||||
|
@ -21,8 +21,6 @@
|
||||
//! Let's start with a basic example, establishing a TCP connection.
|
||||
//!
|
||||
//! ```
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio::net::TcpStream;
|
||||
//!
|
||||
//! # async fn process<T>(t: T) {}
|
||||
|
@ -6,7 +6,6 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![feature(async_await)]
|
||||
|
||||
//! Event loop that drives Tokio I/O resources.
|
||||
//!
|
||||
|
@ -12,8 +12,6 @@
|
||||
//! for it complete.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio_net::process::Command;
|
||||
//!
|
||||
//! #[tokio::main]
|
||||
@ -37,8 +35,6 @@
|
||||
//! world` but we also capture its output.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio_net::process::Command;
|
||||
//!
|
||||
//! #[tokio::main]
|
||||
@ -59,8 +55,6 @@
|
||||
//! We can also read input line by line.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use futures_util::stream::StreamExt;
|
||||
//! use std::process::{Stdio};
|
||||
//! use tokio::codec::{FramedRead, LinesCodec};
|
||||
@ -463,7 +457,6 @@ impl Command {
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
/// use tokio_net::process::Command;
|
||||
///
|
||||
/// async fn run_ls() -> std::process::ExitStatus {
|
||||
@ -509,7 +502,6 @@ impl Command {
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
/// use tokio_net::process::Command;
|
||||
///
|
||||
/// async fn run_ls() -> std::process::ExitStatus {
|
||||
@ -558,7 +550,6 @@ impl Command {
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
/// use tokio_net::process::Command;
|
||||
///
|
||||
/// async fn run_ls() {
|
||||
@ -754,7 +745,6 @@ impl Child {
|
||||
/// > `Child` instance into an event loop as an alternative to this method.
|
||||
///
|
||||
/// ```no_run
|
||||
/// # #![feature(async_await)]
|
||||
/// # use tokio_net::process::Command;
|
||||
///
|
||||
/// # #[tokio::main]
|
||||
|
@ -17,8 +17,6 @@
|
||||
//! Print out all ctrl-C notifications received
|
||||
//!
|
||||
//! ```rust,no_run
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio_net::signal;
|
||||
//!
|
||||
//! use futures_util::future;
|
||||
@ -45,7 +43,6 @@
|
||||
//! Wait for SIGHUP on Unix
|
||||
//!
|
||||
//! ```rust,no_run
|
||||
//! #![feature(async_await)]
|
||||
//! # #[cfg(unix)] {
|
||||
//!
|
||||
//! use tokio_net::signal::{self, unix::{signal, SignalKind}};
|
||||
|
@ -21,8 +21,6 @@ use std::task::{Context, Poll};
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpListener;
|
||||
/// use std::error::Error;
|
||||
/// # async fn process_socket<T>(socket: T) {}
|
||||
@ -74,8 +72,6 @@ impl TcpListener {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
|
||||
/// use tokio::net::TcpListener;
|
||||
///
|
||||
|
@ -34,8 +34,6 @@ use std::time::Duration;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use tokio::prelude::*;
|
||||
/// use std::error::Error;
|
||||
@ -81,8 +79,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use tokio::prelude::*;
|
||||
/// use std::error::Error;
|
||||
@ -182,8 +178,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -203,8 +197,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -243,8 +235,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use tokio::prelude::*;
|
||||
/// use std::error::Error;
|
||||
@ -282,8 +272,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use tokio::prelude::*;
|
||||
/// use std::error::Error;
|
||||
@ -315,8 +303,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -343,8 +329,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -369,8 +353,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -394,8 +376,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -429,8 +409,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -454,8 +432,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -481,8 +457,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -514,8 +488,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -540,8 +512,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -565,8 +535,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -592,8 +560,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
@ -624,8 +590,6 @@ impl TcpStream {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpStream;
|
||||
/// use std::net::SocketAddr;
|
||||
///
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![cfg(feature = "process")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_net::process::Command;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![cfg(feature = "process")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
#![cfg(feature = "signal")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
mod support;
|
||||
use support::*;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
#![cfg(feature = "signal")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
pub mod support;
|
||||
use support::*;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
#![cfg(feature = "signal")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
mod support;
|
||||
use support::*;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
#![cfg(feature = "signal")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
mod support;
|
||||
use support::*;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![cfg(unix)]
|
||||
#![cfg(feature = "signal")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
mod support;
|
||||
use support::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
use tokio::sync::oneshot;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use std::thread;
|
||||
use std::{convert::TryInto, io::Write, net};
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_net::tcp::{TcpListener, TcpStream};
|
||||
|
||||
#[tokio::test]
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio_codec::{Decoder, Encoder};
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![cfg(unix)]
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio_net::uds::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![cfg(unix)]
|
||||
#![feature(async_await)]
|
||||
#![deny(warnings, rust_2018_idioms)]
|
||||
|
||||
use tokio::net::UnixStream;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![cfg(unix)]
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio_net::uds::*;
|
||||
|
@ -6,7 +6,6 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![feature(async_await)]
|
||||
|
||||
//! Asynchronous synchronization primitives.
|
||||
//!
|
||||
|
@ -8,8 +8,6 @@
|
||||
//! This allows you to do something along the lines of:
|
||||
//!
|
||||
//! ```rust,no_run
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio::sync::Lock;
|
||||
//!
|
||||
//! #[tokio::main]
|
||||
|
@ -82,8 +82,6 @@ pub struct RecvError(());
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
@ -132,8 +130,6 @@ impl<T> Receiver<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
@ -152,8 +148,6 @@ impl<T> Receiver<T> {
|
||||
/// Values are buffered:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
@ -221,8 +215,6 @@ impl<T> Sender<T> {
|
||||
/// previously sent value was received.
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
|
@ -100,8 +100,6 @@ impl<T> UnboundedReceiver<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
@ -120,8 +118,6 @@ impl<T> UnboundedReceiver<T> {
|
||||
/// Values are buffered:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
|
@ -93,8 +93,6 @@ struct State(usize);
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::oneshot;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
@ -208,8 +206,6 @@ impl<T> Sender<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::oneshot;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
|
@ -18,8 +18,6 @@
|
||||
//! # Examples
|
||||
//!
|
||||
//! ```
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio::sync::watch;
|
||||
//!
|
||||
//! # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
|
||||
@ -171,8 +169,6 @@ const CLOSED: usize = 1;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::sync::watch;
|
||||
///
|
||||
/// # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate loom;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
#[path = "../src/oneshot.rs"]
|
||||
#[allow(warnings)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_sync::mpsc;
|
||||
use tokio_test::task::MockTask;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_sync::oneshot;
|
||||
use tokio_test::task::MockTask;
|
||||
|
@ -3,8 +3,6 @@
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! #![feature(async_await)]
|
||||
//!
|
||||
//! use tokio::clock;
|
||||
//! use tokio_test::{assert_ready, assert_pending, task};
|
||||
//! use tokio_timer::delay;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
use tokio_test::block_on;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio_test::io::Builder;
|
||||
|
@ -77,8 +77,6 @@ impl Interval {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::timer::Interval;
|
||||
///
|
||||
/// use std::time::Duration;
|
||||
|
@ -6,7 +6,6 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![feature(async_await)]
|
||||
|
||||
//! Utilities for tracking time.
|
||||
//!
|
||||
|
@ -32,8 +32,6 @@ use std::time::{Duration, Instant};
|
||||
/// example:
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::prelude::*;
|
||||
/// use tokio::sync::mpsc;
|
||||
///
|
||||
@ -96,8 +94,6 @@ impl<T> Timeout<T> {
|
||||
/// Create a new `Timeout` set to expire in 10 milliseconds.
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::timer::Timeout;
|
||||
/// use tokio::sync::oneshot;
|
||||
///
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_executor::current_thread::CurrentThread;
|
||||
use tokio_executor::park::{Park, Unpark, UnparkThread};
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_test::task::MockTask;
|
||||
use tokio_test::{assert_pending, assert_ready_eq, clock};
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio_sync::oneshot;
|
||||
use tokio_test::task::MockTask;
|
||||
|
@ -1,5 +1,4 @@
|
||||
// #![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use native_tls::TlsConnector;
|
||||
use std::error::Error;
|
||||
|
@ -6,7 +6,6 @@
|
||||
unreachable_pub
|
||||
)]
|
||||
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
||||
#![feature(async_await)]
|
||||
|
||||
//! Async TLS streams
|
||||
//!
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use env_logger;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use env_logger;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
use env_logger;
|
||||
|
@ -55,7 +55,6 @@ an asynchronous application.
|
||||
A basic TCP echo server with Tokio:
|
||||
|
||||
```rust
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio::net::TcpListener;
|
||||
use tokio::prelude::*;
|
||||
|
@ -24,7 +24,6 @@
|
||||
//! connected clients they'll all join the same room and see everyone else's
|
||||
//! messages.
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use futures::{Poll, SinkExt, Stream, StreamExt};
|
||||
|
@ -15,7 +15,6 @@
|
||||
//! stdin/stdout to a server" to get up and running.
|
||||
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures::{SinkExt, Stream};
|
||||
use std::{env, error::Error, net::SocketAddr};
|
||||
|
@ -10,7 +10,6 @@
|
||||
//!
|
||||
//! Each line you type in to the `nc` terminal should be echo'd back to you!
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use std::error::Error;
|
||||
|
@ -19,7 +19,6 @@
|
||||
//! you! If you open up multiple terminals running the `connect` example you
|
||||
//! should be able to see them all make progress simultaneously.
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use tokio;
|
||||
|
@ -12,7 +12,6 @@
|
||||
//! cargo run --example hello_world
|
||||
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use tokio;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
|
@ -52,7 +52,6 @@
|
||||
//! ```
|
||||
//!
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use std::env;
|
||||
|
@ -21,7 +21,6 @@
|
||||
//! the echo server, and you'll be able to see data flowing between them.
|
||||
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use futures::{future::try_join, FutureExt, StreamExt};
|
||||
use std::{env, error::Error, net::SocketAddr};
|
||||
|
@ -39,7 +39,6 @@
|
||||
//! * `SET $key $value` - this will set the value of `$key` to `$value`,
|
||||
//! returning the previous value, if any.
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
@ -12,7 +12,6 @@
|
||||
//! available, and it doesn't support HTTP request bodies.
|
||||
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
use bytes::BytesMut;
|
||||
use futures::{SinkExt, StreamExt};
|
||||
|
@ -26,7 +26,6 @@
|
||||
//! Please mind that since the UDP protocol doesn't have any capabilities to detect a broken
|
||||
//! connection the server needs to be run first, otherwise the client will block forever.
|
||||
|
||||
#![feature(async_await)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
use std::env;
|
||||
|
@ -6,7 +6,6 @@
|
||||
//! new message with a new destination. Overall, we then use this to construct a
|
||||
//! "ping pong" pair where two sockets are sending messages back and forth.
|
||||
|
||||
#![feature(async_await)]
|
||||
#![cfg(feature = "rt-full")]
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
|
@ -69,8 +69,6 @@ pub struct Spawn(());
|
||||
/// that processes each received connection.
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(async_await)]
|
||||
///
|
||||
/// use tokio::net::TcpListener;
|
||||
///
|
||||
/// # async fn process<T>(t: T) {}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user