]> Untitled Git - lemmy.git/commitdiff
Remove direct `actix-http` dependency
authorRob Ede <robjtede@icloud.com>
Wed, 2 Mar 2022 18:05:48 +0000 (18:05 +0000)
committerRob Ede <robjtede@icloud.com>
Wed, 2 Mar 2022 18:11:05 +0000 (18:11 +0000)
Cargo.lock
crates/routes/Cargo.toml
crates/routes/src/images.rs

index 02ef5b1c70dc56e45ffd0fa211653b3ce2f9fa3d..77e7f01c48eb78faa2d492261bff24e51386bd2d 100644 (file)
@@ -2073,7 +2073,6 @@ name = "lemmy_routes"
 version = "0.16.0-rc.1"
 dependencies = [
  "actix",
- "actix-http",
  "actix-web",
  "actix-web-actors",
  "anyhow",
index 4e16e48c3aad082b417ebd981d5fba1c269f0f72..dace264fcc4c0da9e6dfafd3c01fc270caa4e0fa 100644 (file)
@@ -21,8 +21,7 @@ lemmy_apub = { version = "=0.16.0-rc.1", path = "../apub" }
 diesel = "1.4.8"
 actix = "0.13.0"
 actix-web = { version = "4.0.0", default-features = false, features = ["rustls"] }
-actix-web-actors = { version = "4.0.0", default-features = false }
-actix-http = "3.0.0"
+actix-web-actors = { version = "4.1.0", default-features = false }
 sha2 = "0.10.0"
 anyhow = "1.0.51"
 chrono = { version = "0.4.19", features = ["serde"] }
index 30a6a378ff811fc1806e86733e08a0d84b8ff474..fb4ef2613b344ff689a41e94d185bbbe826831cb 100644 (file)
@@ -1,5 +1,15 @@
-use actix_http::header::{HeaderName, ACCEPT_ENCODING, HOST};
-use actix_web::{body::BodyStream, http::StatusCode, web::Data, *};
+use actix_web::{
+  body::BodyStream,
+  error,
+  http::{
+    header::{HeaderName, ACCEPT_ENCODING, HOST},
+    StatusCode,
+  },
+  web,
+  Error,
+  HttpRequest,
+  HttpResponse,
+};
 use anyhow::anyhow;
 use futures::stream::{Stream, StreamExt};
 use lemmy_utils::{claims::Claims, rate_limit::RateLimit, LemmyError};
@@ -11,7 +21,7 @@ use std::time::Duration;
 
 pub fn config(cfg: &mut web::ServiceConfig, client: ClientWithMiddleware, rate_limit: &RateLimit) {
   cfg
-    .app_data(Data::new(client))
+    .app_data(web::Data::new(client))
     .service(
       web::resource("/pictrs/image")
         .wrap(rate_limit.image())