Browse Source

actix: update rust to 1.35 and actix-web to 1.0rc (#4808)

* update rust to 1.35 and actix-web to 1.0rc

* update actix-http
Nikolay Kim 6 years ago
parent
commit
751e289a9a

+ 4 - 5
frameworks/Rust/actix/Cargo.toml

@@ -25,11 +25,11 @@ path = "src/main_raw.rs"
 
 [dependencies]
 actix = { version="0.8.2", features=["http"] }
-actix-web = { version="1.0.0-beta.5", default-features = false }
-actix-http = { version="0.2.0", default-features = false }
+actix-web = { version="1.0.0-rc", default-features = false }
+actix-http = { version="0.2.1", default-features = false }
 actix-rt = "0.2.2"
 actix-codec = "0.1.2"
-actix-server = "0.5.0"
+actix-server = "0.5.1"
 actix-service = "0.4.0"
 jemallocator = "0.3.0"
 askama = "0.8"
@@ -59,5 +59,4 @@ opt-level = 3
 codegen-units = 1
 
 [patch.crates-io]
-tokio-reactor = { git="https://github.com/fafhrd91/tokio.git" }
-actix-http = { git="https://github.com/actix/actix-web.git", default-features = false }
+tokio-reactor = { git="https://github.com/fafhrd91/tokio.git" }

+ 1 - 1
frameworks/Rust/actix/actix-core.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.34.1
+FROM rust:1.35
 
 ADD ./ /actix
 WORKDIR /actix

+ 1 - 1
frameworks/Rust/actix/actix-diesel.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.34.1
+FROM rust:1.35
 
 ADD ./ /actix
 WORKDIR /actix

+ 1 - 1
frameworks/Rust/actix/actix-pg.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.34.1
+FROM rust:1.35
 
 ADD ./ /actix
 WORKDIR /actix

+ 1 - 1
frameworks/Rust/actix/actix-raw.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.34.1
+FROM rust:1.35
 
 ADD ./ /actix
 WORKDIR /actix

+ 1 - 1
frameworks/Rust/actix/actix.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.34.1
+FROM rust:1.35
 
 ADD ./ /actix
 WORKDIR /actix

+ 4 - 3
frameworks/Rust/actix/src/main_raw.rs

@@ -93,10 +93,11 @@ impl<T: AsyncRead + AsyncWrite> Future for App<T> {
             }
         }
 
+        if self.write_buf.remaining_mut() < 8192 {
+            self.write_buf.reserve(32_768);
+        }
+
         loop {
-            if self.write_buf.remaining_mut() < 1024 {
-                self.write_buf.reserve(32_768);
-            }
             match self.codec.decode(&mut self.read_buf) {
                 Ok(Some(h1::Message::Item(req))) => self.handle_request(req),
                 Ok(None) => break,