aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-03 02:47:11 +0000
committerFuwn <[email protected]>2023-04-03 02:47:11 +0000
commit79ad55e1e0fe746a635e6814fbf048437c2d50ee (patch)
tree12c395e03accf4a4a115b24946760bcae5d0d148 /examples
parentfeat(router): GET RID OF DIRTY BOXES (diff)
downloadwindmark-79ad55e1e0fe746a635e6814fbf048437c2d50ee.tar.xz
windmark-79ad55e1e0fe746a635e6814fbf048437c2d50ee.zip
refactor(handler): trait-based response
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 c139b55..afa6614 100644
--- a/examples/windmark.rs
+++ b/examples/windmark.rs
@@ -65,13 +65,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
router.set_certificate_file("windmark_public.pem");
#[cfg(feature = "logger")]
router.enable_default_logger(true);
- router.set_error_handler(Box::new(move |_| {
+ router.set_error_handler(move |_| {
error_count += 1;
println!("{} errors so far", error_count);
Response::permanent_failure("e")
- }));
+ });
router.set_fix_path(true);
router.attach_stateless(|r| {
r.mount("/module", success!("This is a module!"));