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

Fix docs build #1064

Merged
merged 1 commit into from Aug 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/filters/any.rs
Expand Up @@ -9,7 +9,7 @@ use crate::filter::{Filter, FilterBase, Internal};
/// A filter that matches any route.
///
/// This can be a useful building block to build new filters from,
/// since [`Filter`](crate::Filter) is otherwise a sealed trait.
/// since [`Filter`] is otherwise a sealed trait.
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/filters/fs.rs
Expand Up @@ -37,7 +37,7 @@ use crate::reply::{Reply, Response};
/// filters, such as after validating in `POST` request, wanting to return a
/// specific file as the body.
///
/// For serving a directory, see [dir](dir).
/// For serving a directory, see [dir].
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/filters/log.rs
Expand Up @@ -77,7 +77,7 @@ where
Log { func }
}

/// Decorates a [`Filter`](crate::Filter) to log requests and responses.
/// Decorates a [`Filter`] to log requests and responses.
#[derive(Clone, Copy, Debug)]
pub struct Log<F> {
func: F,
Expand Down
12 changes: 6 additions & 6 deletions src/filters/reply.rs
Expand Up @@ -28,12 +28,12 @@ use self::sealed::{WithDefaultHeader_, WithHeader_, WithHeaders_};
use crate::filter::{Filter, Map, WrapSealed};
use crate::reply::Reply;

/// Wrap a [`Filter`](crate::Filter) that adds a header to the reply.
/// Wrap a [`Filter`] that adds a header to the reply.
///
/// # Note
///
/// This **only** adds a header if the underlying filter is successful, and
/// returns a [`Reply`](Reply). If the underlying filter was rejected, the
/// returns a [`Reply`] If the underlying filter was rejected, the
/// header is not added.
///
/// # Example
Expand All @@ -57,12 +57,12 @@ where
WithHeader { name, value }
}

/// Wrap a [`Filter`](crate::Filter) that adds multiple headers to the reply.
/// Wrap a [`Filter`] that adds multiple headers to the reply.
///
/// # Note
///
/// This **only** adds a header if the underlying filter is successful, and
/// returns a [`Reply`](Reply). If the underlying filter was rejected, the
/// returns a [`Reply`] If the underlying filter was rejected, the
/// header is not added.
///
/// # Example
Expand All @@ -88,13 +88,13 @@ pub fn headers(headers: HeaderMap) -> WithHeaders {

// pub fn headers?

/// Wrap a [`Filter`](crate::Filter) that adds a header to the reply, if they
/// Wrap a [`Filter`] that adds a header to the reply, if they
/// aren't already set.
///
/// # Note
///
/// This **only** adds a header if the underlying filter is successful, and
/// returns a [`Reply`](Reply). If the underlying filter was rejected, the
/// returns a [`Reply`] If the underlying filter was rejected, the
/// header is not added.
///
/// # Example
Expand Down
4 changes: 3 additions & 1 deletion src/filters/sse.rs
Expand Up @@ -39,6 +39,8 @@
//! which specifies the expected behavior of Server Sent Events.
//!

#![allow(rustdoc::invalid_html_tags)]

use serde::Serialize;
use std::borrow::Cow;
use std::error::Error as StdError;
Expand Down Expand Up @@ -376,7 +378,7 @@ impl KeepAlive {

/// Wrap an event stream with keep-alive functionality.
///
/// See [`keep_alive`](keep_alive) for more.
/// See [`keep_alive`] for more.
pub fn stream<S>(
self,
event_stream: S,
Expand Down
2 changes: 1 addition & 1 deletion src/filters/trace.rs
Expand Up @@ -123,7 +123,7 @@ pub fn named(name: &'static str) -> Trace<impl Fn(Info<'_>) -> Span + Copy> {
trace(move |_| tracing::debug_span!("context", "{}", name,))
}

/// Decorates a [`Filter`](crate::Filter) to create a [`tracing`] [span] for
/// Decorates a [`Filter`] to create a [`tracing`] [span] for
/// requests and responses.
///
/// [`tracing`]: https://crates.io/crates/tracing
Expand Down
2 changes: 1 addition & 1 deletion src/filters/ws.rs
Expand Up @@ -68,7 +68,7 @@ pub fn ws() -> impl Filter<Extract = One<Ws>, Error = Rejection> + Copy {
)
}

/// Extracted by the [`ws`](ws) filter, and used to finish an upgrade.
/// Extracted by the [`ws`] filter, and used to finish an upgrade.
pub struct Ws {
config: Option<WebSocketConfig>,
key: SecWebsocketKey,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -81,7 +81,7 @@
//! ## Testing
//!
//! Testing your web services easily is extremely important, and warp provides
//! a [`test`](self::test) module to help send mocked requests through your service.
//! a [`test`](mod@self::test) module to help send mocked requests through your service.
//!
//! [Filter]: trait.Filter.html
//! [reject]: reject/index.html
Expand Down
2 changes: 1 addition & 1 deletion src/redirect.rs
@@ -1,6 +1,6 @@
//! Redirect requests to a new location.
//!
//! The types in this module are helpers that implement [`Reply`](Reply), and easy
//! The types in this module are helpers that implement [`Reply`], and easy
//! to use in order to setup redirects.

use http::{header, StatusCode};
Expand Down
2 changes: 1 addition & 1 deletion src/test.rs
Expand Up @@ -366,7 +366,7 @@ impl RequestBuilder {

/// Returns `Response` provided by applying the `Filter`.
///
/// This requires that the supplied `Filter` return a [`Reply`](Reply).
/// This requires that the supplied `Filter` return a [`Reply`].
pub async fn reply<F>(self, f: &F) -> Response<Bytes>
where
F: Filter + 'static,
Expand Down