mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 17:25:32 +00:00
fix doc test
This commit is contained in:
parent
3ff9e98f20
commit
6c8237276b
2 changed files with 8 additions and 5 deletions
|
@ -138,7 +138,8 @@
|
|||
//!
|
||||
//! Call an async function from the main function:
|
||||
//!
|
||||
//! ```
|
||||
#![cfg_attr(feature = "attributes", doc = "```")]
|
||||
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
|
||||
//! async fn say_hello() {
|
||||
//! println!("Hello, world!");
|
||||
//! }
|
||||
|
@ -151,7 +152,8 @@
|
|||
//!
|
||||
//! Await two futures concurrently, and return a tuple of their output:
|
||||
//!
|
||||
//! ```
|
||||
#![cfg_attr(feature = "attributes", doc = "```")]
|
||||
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
|
||||
//! use async_std::prelude::*;
|
||||
//!
|
||||
//! #[async_std::main]
|
||||
|
@ -164,7 +166,8 @@
|
|||
//!
|
||||
//! Create a UDP server that echoes back each received message to the sender:
|
||||
//!
|
||||
//! ```no_run
|
||||
#![cfg_attr(feature = "attributes", doc = "```no_run")]
|
||||
#![cfg_attr(not(feature = "attributes"), doc = "```ignore")]
|
||||
//! use async_std::net::UdpSocket;
|
||||
//!
|
||||
//! #[async_std::main]
|
||||
|
|
|
@ -1011,7 +1011,7 @@ extension_trait! {
|
|||
|
||||
# Examples
|
||||
|
||||
```ignore
|
||||
```
|
||||
# fn main() { async_std::task::block_on(async {
|
||||
#
|
||||
use async_std::prelude::*;
|
||||
|
@ -1044,7 +1044,7 @@ extension_trait! {
|
|||
|
||||
# Examples
|
||||
|
||||
```ignore
|
||||
```
|
||||
# fn main() { async_std::task::block_on(async {
|
||||
#
|
||||
use async_std::prelude::*;
|
||||
|
|
Loading…
Reference in a new issue