Skip to content

Commit

Permalink
Fix docs build (#1064)
Browse files Browse the repository at this point in the history
fix  "Build docs" CI step.
  • Loading branch information
vitorenesduarte authored Aug 25, 2023
1 parent 149913f commit 4d3a534
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/filters/any.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit 4d3a534

Please sign in to comment.