diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 4 |
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!")); |