diff options
| author | Fuwn <[email protected]> | 2023-04-03 02:47:11 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-03 02:47:11 +0000 |
| commit | 79ad55e1e0fe746a635e6814fbf048437c2d50ee (patch) | |
| tree | 12c395e03accf4a4a115b24946760bcae5d0d148 /examples | |
| parent | feat(router): GET RID OF DIRTY BOXES (diff) | |
| download | windmark-79ad55e1e0fe746a635e6814fbf048437c2d50ee.tar.xz windmark-79ad55e1e0fe746a635e6814fbf048437c2d50ee.zip | |
refactor(handler): trait-based response
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!")); |