Add message to unsupported HTTP method panic

This commit is contained in:
Jonas Platte 2022-01-22 15:03:58 +01:00
parent 7bf538f549
commit 77a87881c9
No known key found for this signature in database
GPG key ID: 7D261D771D915378

View file

@ -363,7 +363,7 @@ impl RouterExt for Router {
Method::POST => MethodFilter::POST,
Method::PUT => MethodFilter::PUT,
Method::TRACE => MethodFilter::TRACE,
_ => panic!(""),
m => panic!("Unsupported HTTP method: {:?}", m),
};
self.route(meta.path, on(method_filter, handler))