aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 11:26:47 +0000
committerFuwn <[email protected]>2022-03-27 11:26:47 +0000
commitd971186326a6300bad86d94ff1e973c4ca3603da (patch)
tree255b1cf037433f2787446b603147a71a40cb3772 /examples
parentfeat(pre/post_route_callback): fnmut closure (diff)
downloadwindmark-d971186326a6300bad86d94ff1e973c4ca3603da.tar.xz
windmark-d971186326a6300bad86d94ff1e973c4ca3603da.zip
feat(handler): fnmut partial
Diffstat (limited to 'examples')
-rw-r--r--examples/windmark.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs
index 21c84a8..29376a8 100644
--- a/examples/windmark.rs
+++ b/examples/windmark.rs
@@ -54,8 +54,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
stream.peer_addr().unwrap().ip()
)
}))
- .set_header(|_| "```\nART IS COOL\n```".to_string())
- .set_footer(|_| "Copyright 2022".to_string())
+ .set_header(Box::new(|_| "```\nART IS COOL\n```".to_string()))
+ .set_footer(Box::new(|_| "Copyright 2022".to_string()))
.mount("/", |_| {
Response::Success(
"# INDEX\n\nWelcome!\n\n=> /test Test Page\n=> /time Unix Epoch\n"