diff --git a/viz-core/src/handler.rs b/viz-core/src/handler.rs index b022642e..0a18d756 100644 --- a/viz-core/src/handler.rs +++ b/viz-core/src/handler.rs @@ -111,7 +111,9 @@ pub trait HandlerExt: Handler { Map::new(self, f) } - /// Maps the handler's output type to the [`Response`][crate::Response]. + /// Maps the handler's output type to the [`Response`]. + /// + /// [`Response`]: crate::Response fn map_into_response(self) -> MapInToResponse where Self: Sized, @@ -169,7 +171,6 @@ pub trait HandlerExt: Handler { } /// Maps the handler. - #[must_use] fn with_fn(self, f: F) -> Self where F: Fn(Self) -> Self, diff --git a/viz/src/lib.rs b/viz/src/lib.rs index 3ec2b174..7f423a8c 100644 --- a/viz/src/lib.rs +++ b/viz/src/lib.rs @@ -145,8 +145,9 @@ //! //! But it's still recommended to use `into_handler` for conversion. //! -//! ```ignore +//! ``` //! # use viz::{handler, types::Params, IntoHandler, IntoResponse, Result, Router}; +//! //! #[handler] //! async fn show_user(Params(id): Params) -> Result { //! Ok(format!("Hi, NO.{}", id)) @@ -166,7 +167,7 @@ //! The [`HandlerExt`] is an extension trait for [Handler]s that provides a variety of convenient //! combinator functions. //! -//! Likes the [`FutureExt`] and [`StreamExt`] trait. +//! Likes the [`FutureExt`] and [`StreamExt`] traits. //! //! ``` //! # use viz::{