Add doc-comment to test README examples (#515)
This commit is contained in:
committed by
Sean McArthur
parent
15595acb04
commit
66a88d946b
@@ -55,6 +55,7 @@ env_logger = "0.6"
|
|||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
libflate = "0.1"
|
libflate = "0.1"
|
||||||
|
doc-comment = "0.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["default-tls"]
|
default = ["default-tls"]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ An ergonomic, batteries-included HTTP Client for Rust.
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```rust
|
```rust,no_run
|
||||||
extern crate reqwest;
|
extern crate reqwest;
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|||||||
@@ -218,6 +218,12 @@ extern crate tokio_rustls;
|
|||||||
extern crate webpki_roots;
|
extern crate webpki_roots;
|
||||||
#[cfg(feature = "rustls-tls")]
|
#[cfg(feature = "rustls-tls")]
|
||||||
extern crate rustls;
|
extern crate rustls;
|
||||||
|
#[cfg(test)]
|
||||||
|
#[macro_use]
|
||||||
|
extern crate doc_comment;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
doctest!("../README.md");
|
||||||
|
|
||||||
pub use hyper::header;
|
pub use hyper::header;
|
||||||
pub use hyper::Method;
|
pub use hyper::Method;
|
||||||
|
|||||||
Reference in New Issue
Block a user