From 7182bbfbe4a79c6fe980a8323cb9e0b5d0a79f91 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 30 Mar 2023 10:40:04 +0000 Subject: docs: fix old response documentation --- src/router.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/router.rs b/src/router.rs index e1e7a11..0f8a82c 100644 --- a/src/router.rs +++ b/src/router.rs @@ -125,11 +125,11 @@ impl Router { /// windmark::Router::new() /// .mount( /// "/", - /// Box::new(|_| Response::Success("This is the index page!".into())), + /// Box::new(|_| Response::success("This is the index page!")), /// ) /// .mount( /// "/test", - /// Box::new(|_| Response::Success("This is a test page!".into())), + /// Box::new(|_| Response::success("This is a test page!")), /// ); /// ``` /// @@ -151,7 +151,7 @@ impl Router { /// /// ```rust /// windmark::Router::new().set_error_handler(Box::new(|_| { - /// windmark::Response::Success("You have encountered an error!".into()) + /// windmark::Response::success("You have encountered an error!") /// })); /// ``` pub fn set_error_handler(&mut self, handler: ErrorResponse) -> &mut Self { @@ -587,11 +587,11 @@ impl Router { /// windmark::Router::new().attach_stateless(|r| { /// r.mount( /// "/module", - /// Box::new(|_| Response::Success("This is a module!".into())), + /// Box::new(|_| Response::success("This is a module!")), /// ); /// r.set_error_handler(Box::new(|_| { - /// Response::NotFound( - /// "This error handler has been implemented by a module!".into(), + /// Response::not_found( + /// "This error handler has been implemented by a module!", /// ) /// })); /// }); @@ -606,7 +606,7 @@ impl Router { /// pub fn module(router: &mut windmark::Router) { /// router.mount( /// "/module", - /// Box::new(|_| windmark::Response::Success("This is a module!".into())), + /// Box::new(|_| windmark::Response::success("This is a module!")), /// ); /// } /// } -- cgit v1.2.3