aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 11:38:41 +0000
committerFuwn <[email protected]>2022-03-27 11:38:41 +0000
commitc60dd3ceda6b818271a48765f676bf3505dcbbeb (patch)
treed4a9a8caa94f259c2fef30e9cafea3d0533451de /README.md
parentfeat(handler): fnmut partial (diff)
downloadwindmark-c60dd3ceda6b818271a48765f676bf3505dcbbeb.tar.xz
windmark-c60dd3ceda6b818271a48765f676bf3505dcbbeb.zip
feat(handler): more fnmut
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5d993d9..0472030 100644
--- a/README.md
+++ b/README.md
@@ -33,10 +33,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::Router::new()
.set_private_key_file("windmark_private.pem")
.set_certificate_chain_file("windmark_pair.pem")
- .mount("/", |_| Response::Success("Hello, World!".into()))
- .set_error_handler(|_| {
+ .mount("/", Box::new(|_| Response::Success("Hello, World!".into())))
+ .set_error_handler(Box::new(|_| {
Response::PermanentFailure("This route does not exist!".into())
- })
+ }))
.run()
.await
}