From 96fd61f3d5451bbd97588f53378beb8274715863 Mon Sep 17 00:00:00 2001
From: Nikolay Kim <fafhrd91@gmail.com>
Date: Mon, 1 Apr 2019 10:26:09 -0700
Subject: [PATCH] rust 1.31.0 compatibility

---
 .travis.yml                  |  1 +
 Cargo.toml                   |  4 ++++
 actix-files/src/lib.rs       |  6 ++++--
 actix-http/CHANGES.md        |  7 +++++++
 actix-http/src/cookie/mod.rs | 12 ++++++------
 src/lib.rs                   |  2 +-
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index c3698625e..00f64d246 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ cache:
 
 matrix:
   include:
+    - rust: 1.31.0
     - rust: stable
     - rust: beta
     - rust: nightly-2019-03-02
diff --git a/Cargo.toml b/Cargo.toml
index 3abe3129b..b5d0e8769 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -113,3 +113,7 @@ flate2 = "1.0.2"
 lto = true
 opt-level = 3
 codegen-units = 1
+
+[patch.crates-io]
+actix = { git = "https://github.com/actix/actix.git" }
+actix-http = { path = "actix-http" }
diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs
index 54b4f9618..d5a47653e 100644
--- a/actix-files/src/lib.rs
+++ b/actix-files/src/lib.rs
@@ -566,7 +566,10 @@ mod tests {
     use bytes::BytesMut;
 
     use super::*;
-    use actix_web::http::{header, header::DispositionType, Method, StatusCode};
+    use actix_web::http::header::{
+        self, ContentDisposition, DispositionParam, DispositionType,
+    };
+    use actix_web::http::{Method, StatusCode};
     use actix_web::test::{self, TestRequest};
     use actix_web::App;
 
@@ -683,7 +686,6 @@ mod tests {
 
     #[test]
     fn test_named_file_image_attachment() {
-        use header::{ContentDisposition, DispositionParam, DispositionType};
         let cd = ContentDisposition {
             disposition: DispositionType::Attachment,
             parameters: vec![DispositionParam::Filename(String::from("test.png"))],
diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index 5659597c6..c5c02865c 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,5 +1,12 @@
 # Changes
 
+## [0.1.0-alpha.3] - 2019-04-xx
+
+### Fixed
+
+* Rust 1.31.0 compatibility
+
+
 ## [0.1.0-alpha.2] - 2019-03-29
 
 ### Added
diff --git a/actix-http/src/cookie/mod.rs b/actix-http/src/cookie/mod.rs
index 5545624a8..0f5f45488 100644
--- a/actix-http/src/cookie/mod.rs
+++ b/actix-http/src/cookie/mod.rs
@@ -59,7 +59,7 @@ mod parse;
 #[macro_use]
 mod secure;
 #[cfg(feature = "secure-cookies")]
-pub use secure::*;
+pub use self::secure::*;
 
 use std::borrow::Cow;
 use std::fmt;
@@ -68,11 +68,11 @@ use std::str::FromStr;
 use percent_encoding::{percent_encode, USERINFO_ENCODE_SET};
 use time::{Duration, Tm};
 
-pub use builder::CookieBuilder;
-pub use draft::*;
-pub use jar::{CookieJar, Delta, Iter};
-use parse::parse_cookie;
-pub use parse::ParseError;
+pub use self::builder::CookieBuilder;
+pub use self::draft::*;
+pub use self::jar::{CookieJar, Delta, Iter};
+use self::parse::parse_cookie;
+pub use self::parse::ParseError;
 
 #[derive(Debug, Clone)]
 enum CookieStr {
diff --git a/src/lib.rs b/src/lib.rs
index cb29fa5b0..ca4968833 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -62,7 +62,7 @@
 //! * SSL support with OpenSSL or `native-tls`
 //! * Middlewares (`Logger`, `Session`, `CORS`, `CSRF`, `DefaultHeaders`)
 //! * Supports [Actix actor framework](https://github.com/actix/actix)
-//! * Supported Rust version: 1.32 or later
+//! * Supported Rust version: 1.31 or later
 //!
 //! ## Package feature
 //!