Merge pull request #1308 from LemmyNet/update_cargo_deps

Updating cargo deps, fixing image if_some deprecation.
This commit is contained in:
Dessalines 2020-12-04 13:07:43 -05:00 committed by GitHub
commit cf3a98afcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 669 additions and 628 deletions

963
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -25,32 +25,32 @@ lemmy_db = { path = "./lemmy_db" }
lemmy_structs = { path = "./lemmy_structs" }
lemmy_rate_limit = { path = "./lemmy_rate_limit" }
lemmy_websocket = { path = "./lemmy_websocket" }
diesel = "1.4"
diesel_migrations = "1.4"
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
actix = "0.10"
actix-web = { version = "3.1", default-features = false, features = ["rustls"] }
actix-files = { version = "0.4", default-features = false }
actix-web-actors = { version = "3.0", default-features = false }
awc = { version = "2.0", default-features = false }
log = "0.4"
env_logger = "0.8"
strum = "0.19"
lazy_static = "1.3"
rss = "1.9"
url = { version = "2.1", features = ["serde"] }
openssl = "0.10"
http-signature-normalization-actix = { version = "0.4", default-features = false, features = ["sha-2"] }
tokio = "0.3"
sha2 = "0.9"
anyhow = "1.0"
reqwest = { version = "0.10", features = ["json"] }
activitystreams = "0.7.0-alpha.4"
actix-rt = { version = "1.1", default-features = false }
serde_json = { version = "1.0", features = ["preserve_order"]}
diesel = "1.4.5"
diesel_migrations = "1.4.0"
chrono = { version = "0.4.19", features = ["serde"] }
serde = { version = "1.0.117", features = ["derive"] }
actix = "0.10.0"
actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] }
actix-files = { version = "0.4.1", default-features = false }
actix-web-actors = { version = "3.0.0", default-features = false }
awc = { version = "2.0.3", default-features = false }
log = "0.4.11"
env_logger = "0.8.2"
strum = "0.20.0"
lazy_static = "1.4.0"
rss = "1.9.0"
url = { version = "2.2.0", features = ["serde"] }
openssl = "0.10.30"
http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] }
tokio = "0.3.5"
sha2 = "0.9.2"
anyhow = "1.0.34"
reqwest = { version = "0.10.9", features = ["json"] }
activitystreams = "0.7.0-alpha.8"
actix-rt = { version = "1.1.1", default-features = false }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
[dev-dependencies.cargo-husky]
version = "1"
version = "1.5.0"
default-features = false # Disable features which are enabled by default
features = ["precommit-hook", "run-cargo-fmt", "run-cargo-clippy"]

View File

@ -15,34 +15,34 @@ lemmy_db = { path = "../lemmy_db" }
lemmy_structs = { path = "../lemmy_structs" }
lemmy_rate_limit = { path = "../lemmy_rate_limit" }
lemmy_websocket = { path = "../lemmy_websocket" }
diesel = "1.4"
bcrypt = "0.8"
chrono = { version = "0.4", features = ["serde"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
serde = { version = "1.0", features = ["derive"] }
actix = "0.10"
actix-web = { version = "3.0", default-features = false }
actix-rt = { version = "1.1", default-features = false }
awc = { version = "2.0", default-features = false }
log = "0.4"
rand = "0.7"
strum = "0.19"
strum_macros = "0.19"
jsonwebtoken = "7.0"
lazy_static = "1.3"
url = { version = "2.1", features = ["serde"] }
openssl = "0.10"
http = "0.2"
http-signature-normalization-actix = { version = "0.4", default-features = false, features = ["sha-2"] }
base64 = "0.13"
tokio = "0.3"
futures = "0.3"
itertools = "0.9"
uuid = { version = "0.8", features = ["serde", "v4"] }
sha2 = "0.9"
async-trait = "0.1"
captcha = "0.0"
anyhow = "1.0"
thiserror = "1.0"
background-jobs = " 0.8"
reqwest = { version = "0.10", features = ["json"] }
diesel = "1.4.5"
bcrypt = "0.9.0"
chrono = { version = "0.4.19", features = ["serde"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
serde = { version = "1.0.117", features = ["derive"] }
actix = "0.10.0"
actix-web = { version = "3.3.2", default-features = false }
actix-rt = { version = "1.1.1", default-features = false }
awc = { version = "2.0.3", default-features = false }
log = "0.4.11"
rand = "0.7.3"
strum = "0.20.0"
strum_macros = "0.20.1"
jsonwebtoken = "7.2.0"
lazy_static = "1.4.0"
url = { version = "2.2.0", features = ["serde"] }
openssl = "0.10.30"
http = "0.2.1"
http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] }
base64 = "0.13.0"
tokio = "0.3.5"
futures = "0.3.8"
itertools = "0.9.0"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
sha2 = "0.9.2"
async-trait = "0.1.42"
captcha = "0.0.8"
anyhow = "1.0.34"
thiserror = "1.0.22"
background-jobs = "0.8.0"
reqwest = { version = "0.10.9", features = ["json"] }

View File

@ -13,37 +13,37 @@ lemmy_utils = { path = "../lemmy_utils" }
lemmy_db = { path = "../lemmy_db" }
lemmy_structs = { path = "../lemmy_structs" }
lemmy_websocket = { path = "../lemmy_websocket" }
diesel = "1.4"
activitystreams = "0.7.0-alpha.7"
diesel = "1.4.5"
activitystreams = "0.7.0-alpha.8"
activitystreams-ext = "0.1.0-alpha.2"
bcrypt = "0.8"
chrono = { version = "0.4", features = ["serde"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
serde = { version = "1.0", features = ["derive"] }
actix = "0.10"
actix-web = { version = "3.0", default-features = false }
actix-rt = { version = "1.1", default-features = false }
awc = { version = "2.0", default-features = false }
log = "0.4"
rand = "0.7"
strum = "0.19"
strum_macros = "0.19"
lazy_static = "1.3"
url = { version = "2.1", features = ["serde"] }
percent-encoding = "2.1"
openssl = "0.10"
http = "0.2"
http-signature-normalization-actix = { version = "0.4", default-features = false, features = ["sha-2"] }
bcrypt = "0.9.0"
chrono = { version = "0.4.19", features = ["serde"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
serde = { version = "1.0.117", features = ["derive"] }
actix = "0.10.0"
actix-web = { version = "3.3.2", default-features = false }
actix-rt = { version = "1.1.1", default-features = false }
awc = { version = "2.0.3", default-features = false }
log = "0.4.11"
rand = "0.7.3"
strum = "0.20.0"
strum_macros = "0.20.1"
lazy_static = "1.4.0"
url = { version = "2.2.0", features = ["serde"] }
percent-encoding = "2.1.0"
openssl = "0.10.30"
http = "0.2.1"
http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] }
http-signature-normalization-reqwest = { version = "0.1.3", default-features = false, features = ["sha-2"] }
base64 = "0.13"
tokio = "0.3"
futures = "0.3"
itertools = "0.9"
uuid = { version = "0.8", features = ["serde", "v4"] }
sha2 = "0.9"
async-trait = "0.1"
anyhow = "1.0"
thiserror = "1.0"
background-jobs = " 0.8"
reqwest = { version = "0.10", features = ["json"] }
backtrace = "0.3"
base64 = "0.13.0"
tokio = "0.3.5"
futures = "0.3.8"
itertools = "0.9.0"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
sha2 = "0.9.2"
async-trait = "0.1.42"
anyhow = "1.0.34"
thiserror = "1.0.22"
background-jobs = "0.8.0"
reqwest = { version = "0.10.9", features = ["json"] }
backtrace = "0.3.55"

View File

@ -9,15 +9,15 @@ path = "src/lib.rs"
[dependencies]
lemmy_utils = { path = "../lemmy_utils" }
diesel = { version = "1.4", features = ["postgres","chrono","r2d2","64-column-tables","serde_json"] }
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
strum = "0.19"
strum_macros = "0.19"
log = "0.4"
sha2 = "0.9"
bcrypt = "0.8"
url = { version = "2.1", features = ["serde"] }
lazy_static = "1.3"
regex = "1.3"
diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","64-column-tables","serde_json"] }
chrono = { version = "0.4.19", features = ["serde"] }
serde = { version = "1.0.117", features = ["derive"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
strum = "0.20.0"
strum_macros = "0.20.1"
log = "0.4.11"
sha2 = "0.9.2"
bcrypt = "0.9.0"
url = { version = "2.2.0", features = ["serde"] }
lazy_static = "1.4.0"
regex = "1.4.2"

View File

@ -10,9 +10,9 @@ path = "src/lib.rs"
[dependencies]
lemmy_utils = { path = "../lemmy_utils" }
tokio = { version = "0.3", features = ["sync"] }
strum = "0.19"
strum_macros = "0.19"
futures = "0.3.5"
actix-web = { version = "3.0", default-features = false, features = ["rustls"] }
log = "0.4"
tokio = { version = "0.3.5", features = ["sync"] }
strum = "0.20.0"
strum_macros = "0.20.1"
futures = "0.3.8"
actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] }
log = "0.4.11"

View File

@ -11,9 +11,9 @@ path = "src/lib.rs"
[dependencies]
lemmy_db = { path = "../lemmy_db" }
lemmy_utils = { path = "../lemmy_utils" }
serde = { version = "1.0", features = ["derive"] }
log = "0.4"
diesel = "1.4"
actix-web = { version = "3.0" }
chrono = { version = "0.4", features = ["serde"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
serde = { version = "1.0.117", features = ["derive"] }
log = "0.4.11"
diesel = "1.4.5"
actix-web = "3.3.2"
chrono = { version = "0.4.19", features = ["serde"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }

View File

@ -8,22 +8,22 @@ name = "lemmy_utils"
path = "src/lib.rs"
[dependencies]
regex = "1.3"
config = { version = "0.10", default-features = false, features = ["hjson"] }
chrono = { version = "0.4", features = ["serde"] }
lettre = "0.10.0-alpha.3"
log = "0.4"
itertools = "0.9"
rand = "0.7"
percent-encoding = "2.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
thiserror = "1.0"
comrak = { version = "0.8", default-features = false }
lazy_static = "1.3"
openssl = "0.10"
url = { version = "2.1", features = ["serde"] }
actix-web = { version = "3.0", default-features = false, features = ["rustls"] }
actix-rt = { version = "1.1", default-features = false }
anyhow = "1.0"
reqwest = { version = "0.10", features = ["json"] }
regex = "1.4.2"
config = { version = "0.10.1", default-features = false, features = ["hjson"] }
chrono = { version = "0.4.19", features = ["serde"] }
lettre = "0.10.0-alpha.4"
log = "0.4.11"
itertools = "0.9.0"
rand = "0.7.3"
percent-encoding = "2.1.0"
serde = { version = "1.0.117", features = ["derive"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
thiserror = "1.0.22"
comrak = { version = "0.9.0", default-features = false }
lazy_static = "1.4.0"
openssl = "0.10.30"
url = { version = "2.2.0", features = ["serde"] }
actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] }
actix-rt = { version = "1.1.1", default-features = false }
anyhow = "1.0.34"
reqwest = { version = "0.10.9", features = ["json"] }

View File

@ -13,16 +13,16 @@ lemmy_utils = { path = "../lemmy_utils" }
lemmy_structs = { path = "../lemmy_structs" }
lemmy_db = { path = "../lemmy_db" }
lemmy_rate_limit = { path = "../lemmy_rate_limit" }
reqwest = { version = "0.10", features = ["json"] }
log = "0.4"
rand = "0.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order"]}
actix = "0.10"
anyhow = "1.0"
diesel = "1.4"
background-jobs = " 0.8"
tokio = "0.3"
strum = "0.19"
strum_macros = "0.19"
chrono = { version = "0.4", features = ["serde"] }
reqwest = { version = "0.10.9", features = ["json"] }
log = "0.4.11"
rand = "0.7.3"
serde = { version = "1.0.117", features = ["derive"] }
serde_json = { version = "1.0.60", features = ["preserve_order"] }
actix = "0.10.0"
anyhow = "1.0.34"
diesel = "1.4.5"
background-jobs = "0.8.0"
tokio = "0.3.5"
strum = "0.20.0"
strum_macros = "0.20.1"
chrono = { version = "0.4.19", features = ["serde"] }

View File

@ -56,13 +56,14 @@ async fn upload(
return Ok(HttpResponse::Unauthorized().finish());
};
let mut res = client
.request_from(format!("{}/image", Settings::get().pictrs_url), req.head())
.if_some(req.head().peer_addr, |addr, req| {
req.header("X-Forwarded-For", addr.to_string())
})
.send_stream(body)
.await?;
let mut client_req =
client.request_from(format!("{}/image", Settings::get().pictrs_url), req.head());
if let Some(addr) = req.head().peer_addr {
client_req = client_req.header("X-Forwarded-For", addr.to_string())
};
let mut res = client_req.send_stream(body).await?;
let images = res.json::<Images>().await?;
@ -105,14 +106,13 @@ async fn image(
req: HttpRequest,
client: web::Data<Client>,
) -> Result<HttpResponse, Error> {
let res = client
.request_from(url, req.head())
.if_some(req.head().peer_addr, |addr, req| {
req.header("X-Forwarded-For", addr.to_string())
})
.no_decompress()
.send()
.await?;
let mut client_req = client.request_from(url, req.head());
if let Some(addr) = req.head().peer_addr {
client_req = client_req.header("X-Forwarded-For", addr.to_string())
};
let res = client_req.no_decompress().send().await?;
if res.status() == StatusCode::NOT_FOUND {
return Ok(HttpResponse::NotFound().finish());
@ -140,14 +140,14 @@ async fn delete(
&token,
&file
);
let res = client
.request_from(url, req.head())
.if_some(req.head().peer_addr, |addr, req| {
req.header("X-Forwarded-For", addr.to_string())
})
.no_decompress()
.send()
.await?;
let mut client_req = client.request_from(url, req.head());
if let Some(addr) = req.head().peer_addr {
client_req = client_req.header("X-Forwarded-For", addr.to_string())
};
let res = client_req.no_decompress().send().await?;
Ok(HttpResponse::build(res.status()).body(BodyStream::new(res)))
}