Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix docs warnings when docs built with --all-features #156

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/client/legacy/connect/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub struct CaptureConnection {
/// [`capture_connection`] allows a caller to capture the returned [`Connected`] structure as soon
/// as the connection is established.
///
/// [`Connection`]: crate::client::legacy::connect::Connection
///
/// *Note*: If establishing a connection fails, [`CaptureConnection::connection_metadata`] will always return none.
///
/// # Examples
Expand Down
3 changes: 1 addition & 2 deletions src/client/legacy/connect/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
//!
//! This module contains:
//!
//! - A [`GaiResolver`](GaiResolver) that is the default resolver for the
//! `HttpConnector`.
//! - A [`GaiResolver`] that is the default resolver for the `HttpConnector`.
//! - The `Name` type used as an argument to custom resolvers.
//!
//! # Resolvers are `Service`s
Expand Down
2 changes: 1 addition & 1 deletion src/client/legacy/connect/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl HttpConnector {
impl<R> HttpConnector<R> {
/// Construct a new HttpConnector.
///
/// Takes a [`Resolver`](crate::client::connect::dns#resolvers-are-services) to handle DNS lookups.
/// Takes a [`Resolver`](crate::client::legacy::connect::dns#resolvers-are-services) to handle DNS lookups.
pub fn new_with_resolver(resolver: R) -> HttpConnector<R> {
HttpConnector {
config: Arc::new(Config {
Expand Down
6 changes: 6 additions & 0 deletions src/server/conn/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ impl<E> Builder<E> {
/// Only accepts HTTP/2
///
/// Does not do anything if used with [`serve_connection_with_upgrades`]
///
/// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
#[cfg(feature = "http2")]
pub fn http2_only(mut self) -> Self {
assert!(self.version.is_none());
Expand All @@ -120,6 +122,8 @@ impl<E> Builder<E> {
/// Only accepts HTTP/1
///
/// Does not do anything if used with [`serve_connection_with_upgrades`]
///
/// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
#[cfg(feature = "http1")]
pub fn http1_only(mut self) -> Self {
assert!(self.version.is_none());
Expand Down Expand Up @@ -169,6 +173,8 @@ impl<E> Builder<E> {
/// Note that if you ever want to use [`hyper::upgrade::Upgraded::downcast`]
/// with this crate, you'll need to use [`hyper_util::server::conn::auto::upgrade::downcast`]
/// instead. See the documentation of the latter to understand why.
///
/// [`hyper_util::server::conn::auto::upgrade::downcast`]: crate::server::conn::auto::upgrade::downcast
pub fn serve_connection_with_upgrades<I, S, B>(
&self,
io: I,
Expand Down
4 changes: 3 additions & 1 deletion src/server/conn/auto/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ use crate::common::rewind::Rewind;
///
/// On success, returns the downcasted parts. On error, returns the Upgraded back.
/// This is a kludge to work around the fact that the machinery provided by
/// [`hyper_util::server::con::auto`] wraps the inner `T` with a private type
/// [`hyper_util::server::conn::auto`] wraps the inner `T` with a private type
/// that is not reachable from outside the crate.
///
/// [`hyper_util::server::conn::auto`]: crate::server::conn::auto
///
/// This kludge will be removed when this machinery is added back to the main
/// `hyper` code.
pub fn downcast<T>(upgraded: Upgraded) -> Result<Parts<T>, Upgraded>
Expand Down