mirror of https://github.com/rwf2/Rocket.git
Revert change
This commit is contained in:
parent
b602bbfe34
commit
e59552e312
|
@ -18,8 +18,8 @@ macro_rules! run_test {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_root() {
|
fn test_root() {
|
||||||
// Check that the redirect works.
|
// Check that the redirect works.
|
||||||
for method in vec![Get, Head].into_iter() {
|
for method in &[Get, Head] {
|
||||||
let mut req = MockRequest::new(method, "/");
|
let mut req = MockRequest::new(*method, "/");
|
||||||
run_test!(req, |mut response: Response| {
|
run_test!(req, |mut response: Response| {
|
||||||
assert_eq!(response.status(), Status::SeeOther);
|
assert_eq!(response.status(), Status::SeeOther);
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ fn test_root() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that other request methods are not accepted (and instead caught).
|
// Check that other request methods are not accepted (and instead caught).
|
||||||
for method in vec![Post, Put, Delete, Options, Trace, Connect, Patch].into_iter() {
|
for method in &[Post, Put, Delete, Options, Trace, Connect, Patch] {
|
||||||
let mut req = MockRequest::new(method, "/");
|
let mut req = MockRequest::new(*method, "/");
|
||||||
run_test!(req, |mut response: Response| {
|
run_test!(req, |mut response: Response| {
|
||||||
assert_eq!(response.status(), Status::NotFound);
|
assert_eq!(response.status(), Status::NotFound);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue