Merge pull request #201 from GuillaumeGomez/doc-comment

Add doc-comment to test README examples
This commit is contained in:
Stjepan Glavina 2020-08-14 11:36:43 +02:00 committed by GitHub
commit a2a2601fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -43,6 +43,7 @@ async-std = "1.6.2"
async-tungstenite = { version = "0.7.1", features = ["async-native-tls"] }
base64 = "0.12.3"
ctrlc = "3.1.5"
doc-comment = "0.3"
futures = "0.3.5"
http = "0.2.1"
http-types = "2.3.0"

View File

@ -17,7 +17,7 @@ A small and fast async runtime.
Connect to an HTTP website, make a GET request, and pipe the response to the standard output:
```rust
```rust,no_run
use async_net::TcpStream;
use smol::{io, prelude::*, Unblock};
@ -75,7 +75,7 @@ The certificate file was generated using
[minica](https://github.com/jsha/minica) and
[openssl](https://www.openssl.org/):
```
```text
minica --domains localhost -ip-addresses 127.0.0.1 -ca-cert certificate.pem
openssl pkcs12 -export -out identity.pfx -inkey localhost/key.pem -in localhost/cert.pem
```

View File

@ -51,6 +51,9 @@
#![forbid(unsafe_code)]
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#[cfg(doctest)]
doc_comment::doctest!("../README.md");
use std::env;
use std::future::Future;