Ensure doc tests are run in CI

This commit is contained in:
Benjamin Fry
2021-08-01 16:31:15 -04:00
committed by Dirkjan Ochtman
parent 236f98bdc4
commit 0e8e1b7bc9
7 changed files with 56 additions and 19 deletions

View File

@@ -78,15 +78,17 @@
//! ```
//! use std::net::*;
//! use async_std::prelude::*;
//! # #[cfg(feature = "system-config")]
//! use async_std_resolver::{resolver_from_system_conf, config};
//!
//! #[async_std::main]
//! async fn main() {
//! # #[cfg(feature = "system-config")]
//! # {
//! // Use the host OS'es `/etc/resolv.conf`
//! # #[cfg(unix)]
//! let resolver = resolver_from_system_conf().await.unwrap();
//! # #[cfg(unix)]
//! let response = resolver.lookup_ip("www.example.com.").await.unwrap();
//! # }
//! }
//! ```