aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-03-30 10:40:04 +0000
committerFuwn <[email protected]>2023-03-30 10:40:04 +0000
commit7182bbfbe4a79c6fe980a8323cb9e0b5d0a79f91 (patch)
tree8a4ffb75c7b367fdcab305664553a836f651cef4 /src
parentfeat: overhaul response system (diff)
downloadwindmark-7182bbfbe4a79c6fe980a8323cb9e0b5d0a79f91.tar.xz
windmark-7182bbfbe4a79c6fe980a8323cb9e0b5d0a79f91.zip
docs: fix old response documentation
Diffstat (limited to 'src')
-rw-r--r--src/router.rs14
1 files changed, 7 insertions, 7 deletions
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!")),
/// );
/// }
/// }