From f4858e1029d280571eb7f6c2f05fa0967c0f6d5b Mon Sep 17 00:00:00 2001 From: Tal Garfinkel Date: Wed, 18 Jul 2018 19:03:03 -0700 Subject: [PATCH] Fix various warnings generated by build: (#43) -removed conservative_impl_trait as it is no longer needed with the current compiler. -removed allow(unmounted_route) as rocket no longer provides this linter. --- src/lib.rs | 1 + tests/manual.rs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f3800de..56fca20 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1030,6 +1030,7 @@ pub struct Cors { /// [Resource Processing Model](https://www.w3.org/TR/cors/#resource-processing-model). /// /// Defaults to `All`. + /// #[cfg_attr(feature = "serialization", serde(default))] pub allowed_origins: AllowedOrigins, /// The list of methods which the allowed origins are allowed to access for diff --git a/tests/manual.rs b/tests/manual.rs index f868f1a..c12cc7a 100644 --- a/tests/manual.rs +++ b/tests/manual.rs @@ -49,7 +49,6 @@ fn owned<'r>() -> impl Responder<'r> { // The following routes tests that the routes can be compiled with manual CORS /// `Responder` with String -#[allow(unmounted_route)] #[get("/")] fn responder_string(options: State) -> impl Responder { options @@ -59,7 +58,6 @@ fn responder_string(options: State) -> impl Responder { struct TestState; /// Borrow something else from Rocket with lifetime `'r` -#[allow(unmounted_route)] #[get("/")] fn borrow<'r>(options: State<'r, Cors>, test_state: State<'r, TestState>) -> impl Responder<'r> { let borrow = test_state.inner();