From accef5488a11d76958120f4a0f4501b3b39eb3c8 Mon Sep 17 00:00:00 2001 From: Yong Wen Chua Date: Mon, 16 Jul 2018 09:36:07 +0800 Subject: [PATCH] Bump Rocket, Rust version and remove impl trait flag --- .travis.yml | 2 +- Cargo.toml | 2 +- examples/manual.rs | 2 +- examples/mix.rs | 2 +- src/lib.rs | 10 +++------- tests/manual.rs | 2 +- tests/mix.rs | 2 +- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3e9966..1c5df86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: rust rust: - nightly # Minimum Rust set by Rocket -- nightly-2018-01-13 +- nightly-2018-06-22 cache: cargo env: global: diff --git a/Cargo.toml b/Cargo.toml index 8b3e68d..822d5db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ serialization = ["serde", "serde_derive", "unicase_serde", "url_serde"] [dependencies] log = "0.3" -rocket = "0.3.6" +rocket = "0.3.14" unicase = "2.0" url = "1.5.1" diff --git a/examples/manual.rs b/examples/manual.rs index e61d52c..9bb628e 100644 --- a/examples/manual.rs +++ b/examples/manual.rs @@ -1,4 +1,4 @@ -#![feature(plugin, conservative_impl_trait)] +#![feature(plugin)] #![plugin(rocket_codegen)] extern crate rocket; extern crate rocket_cors; diff --git a/examples/mix.rs b/examples/mix.rs index a5da94d..6b53fcb 100644 --- a/examples/mix.rs +++ b/examples/mix.rs @@ -3,7 +3,7 @@ //! In this example, you typically have an application wide `Cors` struct except for one specific //! `ping` route that you want to allow all Origins to access. -#![feature(plugin, conservative_impl_trait)] +#![feature(plugin)] #![plugin(rocket_codegen)] extern crate rocket; extern crate rocket_cors; diff --git a/src/lib.rs b/src/lib.rs index 2dd05a2..97a4bac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -259,10 +259,6 @@ //! that has any side effects or with an appreciable computation cost inside this handler. //! //! ### Steps to perform: -//! - Your crate will need to enable the -//! [`conservative_impl_trait`](https://github.com/rust-lang/rfcs/blob/master/text/1522-conservative-impl-trait.md) -//! feature. You can use `#![feature(conservative_impl_trait)]` at your crate root. -//! Otherwise, the return type of your routes will be unspecifiable. //! - You will first need to have a `Cors` struct ready. This struct can be borrowed with a lifetime //! at least as long as `'r` which is the lifetime of a Rocket request. `'static` works too. //! In this case, you might as well use the `Guard` method above and place the `Cors` struct in @@ -299,7 +295,7 @@ //! (which you might have put in Rocket's state). //! //! ```rust,no_run -//! #![feature(plugin, conservative_impl_trait)] +//! #![feature(plugin)] //! #![plugin(rocket_codegen)] //! extern crate rocket; //! extern crate rocket_cors; @@ -356,7 +352,7 @@ //! special handling, you might want to use the Guard method instead which has less hassle. //! //! ```rust,no_run -//! #![feature(plugin, conservative_impl_trait)] +//! #![feature(plugin)] //! #![plugin(rocket_codegen)] //! extern crate rocket; //! extern crate rocket_cors; @@ -425,7 +421,7 @@ //! You can run the example code below with `cargo run --example mix`. //! //! ```rust,no_run -//! #![feature(plugin, conservative_impl_trait)] +//! #![feature(plugin)] //! #![plugin(rocket_codegen)] //! extern crate rocket; //! extern crate rocket_cors; diff --git a/tests/manual.rs b/tests/manual.rs index 6d0b189..8c07081 100644 --- a/tests/manual.rs +++ b/tests/manual.rs @@ -1,6 +1,6 @@ //! This crate tests using `rocket_cors` using manual mode -#![feature(plugin, conservative_impl_trait)] +#![feature(plugin)] #![plugin(rocket_codegen)] extern crate hyper; extern crate rocket; diff --git a/tests/mix.rs b/tests/mix.rs index adde71b..81b6cae 100644 --- a/tests/mix.rs +++ b/tests/mix.rs @@ -3,7 +3,7 @@ //! In this example, you typically have an application wide `Cors` struct except for one specific //! `ping` route that you want to allow all Origins to access. -#![feature(plugin, conservative_impl_trait)] +#![feature(plugin)] #![plugin(rocket_codegen)] extern crate hyper; extern crate rocket;