Skip to content

Commit 753aab2

Browse files
chore: Fix docs warnings (#156)
1 parent a636037 commit 753aab2

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

src/client/legacy/connect/capture.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub struct CaptureConnection {
1919
/// [`capture_connection`] allows a caller to capture the returned [`Connected`] structure as soon
2020
/// as the connection is established.
2121
///
22+
/// [`Connection`]: crate::client::legacy::connect::Connection
23+
///
2224
/// *Note*: If establishing a connection fails, [`CaptureConnection::connection_metadata`] will always return none.
2325
///
2426
/// # Examples

src/client/legacy/connect/dns.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
//!
33
//! This module contains:
44
//!
5-
//! - A [`GaiResolver`](GaiResolver) that is the default resolver for the
6-
//! `HttpConnector`.
5+
//! - A [`GaiResolver`] that is the default resolver for the `HttpConnector`.
76
//! - The `Name` type used as an argument to custom resolvers.
87
//!
98
//! # Resolvers are `Service`s

src/client/legacy/connect/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl HttpConnector {
168168
impl<R> HttpConnector<R> {
169169
/// Construct a new HttpConnector.
170170
///
171-
/// Takes a [`Resolver`](crate::client::connect::dns#resolvers-are-services) to handle DNS lookups.
171+
/// Takes a [`Resolver`](crate::client::legacy::connect::dns#resolvers-are-services) to handle DNS lookups.
172172
pub fn new_with_resolver(resolver: R) -> HttpConnector<R> {
173173
HttpConnector {
174174
config: Arc::new(Config {

src/server/conn/auto/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ impl<E> Builder<E> {
110110
/// Only accepts HTTP/2
111111
///
112112
/// Does not do anything if used with [`serve_connection_with_upgrades`]
113+
///
114+
/// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
113115
#[cfg(feature = "http2")]
114116
pub fn http2_only(mut self) -> Self {
115117
assert!(self.version.is_none());
@@ -120,6 +122,8 @@ impl<E> Builder<E> {
120122
/// Only accepts HTTP/1
121123
///
122124
/// Does not do anything if used with [`serve_connection_with_upgrades`]
125+
///
126+
/// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
123127
#[cfg(feature = "http1")]
124128
pub fn http1_only(mut self) -> Self {
125129
assert!(self.version.is_none());
@@ -169,6 +173,8 @@ impl<E> Builder<E> {
169173
/// Note that if you ever want to use [`hyper::upgrade::Upgraded::downcast`]
170174
/// with this crate, you'll need to use [`hyper_util::server::conn::auto::upgrade::downcast`]
171175
/// instead. See the documentation of the latter to understand why.
176+
///
177+
/// [`hyper_util::server::conn::auto::upgrade::downcast`]: crate::server::conn::auto::upgrade::downcast
172178
pub fn serve_connection_with_upgrades<I, S, B>(
173179
&self,
174180
io: I,

src/server/conn/auto/upgrade.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ use crate::common::rewind::Rewind;
1212
///
1313
/// On success, returns the downcasted parts. On error, returns the Upgraded back.
1414
/// This is a kludge to work around the fact that the machinery provided by
15-
/// [`hyper_util::server::con::auto`] wraps the inner `T` with a private type
15+
/// [`hyper_util::server::conn::auto`] wraps the inner `T` with a private type
1616
/// that is not reachable from outside the crate.
1717
///
18+
/// [`hyper_util::server::conn::auto`]: crate::server::conn::auto
19+
///
1820
/// This kludge will be removed when this machinery is added back to the main
1921
/// `hyper` code.
2022
pub fn downcast<T>(upgraded: Upgraded) -> Result<Parts<T>, Upgraded>

0 commit comments

Comments
 (0)