From 22da02fa64caea99bde27e97b3329728cf320f02 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 9 Sep 2019 16:52:36 -0700 Subject: [PATCH] Remove double semicolons; silence test warnings. --- core/codegen/tests/route.rs | 1 + examples/manual_routes/src/tests.rs | 4 ++-- examples/state/src/tests.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/codegen/tests/route.rs b/core/codegen/tests/route.rs index e752bfa4..bdc92e25 100644 --- a/core/codegen/tests/route.rs +++ b/core/codegen/tests/route.rs @@ -70,6 +70,7 @@ fn post2( format!("({}) ({})", string, uri.to_string()) } +#[allow(dead_code)] #[post("/<_unused_param>?<_unused_query>", data="<_unused_data>")] fn test_unused_params(_unused_param: String, _unused_query: String, _unused_data: Data) { } diff --git a/examples/manual_routes/src/tests.rs b/examples/manual_routes/src/tests.rs index e07709fd..df6a1d87 100644 --- a/examples/manual_routes/src/tests.rs +++ b/examples/manual_routes/src/tests.rs @@ -3,7 +3,7 @@ use rocket::local::Client; use rocket::http::{ContentType, Status}; fn test(uri: &str, content_type: ContentType, status: Status, body: String) { - let client = Client::new(rocket()).unwrap();; + let client = Client::new(rocket()).unwrap(); let mut response = client.get(uri).header(content_type).dispatch(); assert_eq!(response.status(), status); assert_eq!(response.body_string(), Some(body)); @@ -30,7 +30,7 @@ fn test_echo() { #[test] fn test_upload() { - let client = Client::new(rocket()).unwrap();; + let client = Client::new(rocket()).unwrap(); let expected_body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \ sed do eiusmod tempor incididunt ut labore et dolore \ magna aliqua".to_string(); diff --git a/examples/state/src/tests.rs b/examples/state/src/tests.rs index d27faf6a..d83beed7 100644 --- a/examples/state/src/tests.rs +++ b/examples/state/src/tests.rs @@ -2,7 +2,7 @@ use rocket::local::Client; use rocket::http::Status; fn register_hit(client: &Client) { - let response = client.get("/").dispatch();; + let response = client.get("/").dispatch(); assert_eq!(response.status(), Status::Ok); }