docs(client): Add tcp feature for Client::new docs

added cfg attr to denote required tcp feature in docs for Client::new method

Closes: #2759
This commit is contained in:
Ilya Trefilov
2022-02-15 22:53:20 +03:00
committed by Sean McArthur
parent c734b7904d
commit 4fcfe1f4ba

View File

@@ -59,6 +59,7 @@ impl Client<HttpConnector, Body> {
/// The default connector does **not** handle TLS. Speaking to `https`
/// destinations will require [configuring a connector that implements
/// TLS](https://hyper.rs/guides/client/configuration).
#[cfg_attr(docsrs, doc(cfg(feature = "tcp")))]
#[inline]
pub fn new() -> Client<HttpConnector, Body> {
Builder::default().build_http()