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.
This commit is contained in:
Tal Garfinkel 2018-07-18 19:03:03 -07:00 committed by Yong Wen Chua
parent e11e973da8
commit f4858e1029
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -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<Cors>) -> impl Responder {
options
@ -59,7 +58,6 @@ fn responder_string(options: State<Cors>) -> 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();