From 4833874c5da64e9beffd07e7a60881fb19f2d75c Mon Sep 17 00:00:00 2001 From: Cameron Dershem Date: Wed, 26 Jun 2019 19:18:43 -0400 Subject: [PATCH] Moves everything into the cargo workspace. --- examples/Cargo.toml | 4 ++-- examples/errors/src/main.rs | 13 ++++++------- examples/responses/src/compress.rs | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index b5dc000..a9d2fb1 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -19,12 +19,12 @@ members = [ "middleware", "static-files", "http2", -] -exclude = [ "testing", "async-handlers", "websockets", "request-handlers", +] +exclude = [ "og_databases", "sentry", ] diff --git a/examples/errors/src/main.rs b/examples/errors/src/main.rs index 0f46d09..97c55c3 100644 --- a/examples/errors/src/main.rs +++ b/examples/errors/src/main.rs @@ -22,12 +22,11 @@ fn index(_req: HttpRequest) -> Result<&'static str, MyError> { // pub fn main() { - // use actix_web::{web, App, HttpServer}; + use actix_web::{web, App, HttpServer}; - // HttpServer::new(|| App::new().route("/", web::get().to(index))) - // .bind("127.0.0.1:8088") - // .unwrap() - // .run() - // .unwrap(); - recommend_two::main(); + HttpServer::new(|| App::new().route("/", web::get().to(index))) + .bind("127.0.0.1:8088") + .unwrap() + .run() + .unwrap(); } diff --git a/examples/responses/src/compress.rs b/examples/responses/src/compress.rs index 4bd40d9..105b76b 100644 --- a/examples/responses/src/compress.rs +++ b/examples/responses/src/compress.rs @@ -1,5 +1,5 @@ // -use actix_web::{http::ContentEncoding, middleware, HttpResponse}; +use actix_web::{middleware, HttpResponse}; fn index_br() -> HttpResponse { HttpResponse::Ok().body("data")