From 8e9da0baa136803404535107258f3a760a16dd09 Mon Sep 17 00:00:00 2001 From: aumetra Date: Sun, 1 Dec 2024 21:57:13 +0100 Subject: [PATCH] more --- Cargo.lock | 6 ------ Cargo.toml | 12 ++++++++++++ crates/kitsune-activitypub/Cargo.toml | 2 +- crates/kitsune-cache/Cargo.toml | 2 +- crates/kitsune-captcha/Cargo.toml | 2 +- crates/kitsune-core/Cargo.toml | 2 +- crates/kitsune-error/Cargo.toml | 2 +- crates/kitsune-oidc/Cargo.toml | 2 +- crates/kitsune-search/Cargo.toml | 2 +- crates/kitsune-service/Cargo.toml | 4 ++-- crates/kitsune-wasm-mrf/Cargo.toml | 2 +- lib/athena/Cargo.toml | 6 +++--- lib/cursiv/Cargo.toml | 6 +++--- lib/fast-cjson/Cargo.toml | 4 ++-- lib/geomjeungja/Cargo.toml | 2 +- lib/http-signatures/Cargo.toml | 2 +- lib/masto-id-convert/Cargo.toml | 2 +- lib/post-process/Cargo.toml | 2 +- lib/tick-tock-mock/Cargo.toml | 2 +- lib/tower-http-digest/Cargo.toml | 13 ++++++------- lib/tower-http-digest/src/lib.rs | 6 +----- lib/tower-http-digest/tests/digest.rs | 3 +-- lib/tower-stop-using-brave/Cargo.toml | 9 ++++----- lib/tower-stop-using-brave/src/lib.rs | 3 +-- lib/tower-x-clacks-overhead/Cargo.toml | 5 ++--- lib/tower-x-clacks-overhead/src/lib.rs | 6 ++---- lib/trials/Cargo.toml | 2 +- 27 files changed, 53 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21812631d..d890c422c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7134,8 +7134,6 @@ dependencies = [ "sha2", "subtle", "tower 0.5.1", - "tower-layer", - "tower-service", "tracing", ] @@ -7160,8 +7158,6 @@ dependencies = [ "http", "regex", "tower 0.5.1", - "tower-layer", - "tower-service", ] [[package]] @@ -7173,8 +7169,6 @@ dependencies = [ "itertools 0.13.0", "pin-project-lite", "tower 0.5.1", - "tower-layer", - "tower-service", "triomphe", ] diff --git a/Cargo.toml b/Cargo.toml index e62905a91..15c63377c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,6 +79,7 @@ members = [ resolver = "2" [workspace.dependencies] +ahash = "0.8.11" argon2 = { version = "0.5.3", features = ["std"] } async-graphql = { version = "7.0.11", default-features = false, features = [ "graphiql", @@ -89,6 +90,7 @@ async-graphql = { version = "7.0.11", default-features = false, features = [ ] } asynk-strim = "0.1.2" async-trait = "0.1.83" +axum-core = "0.4.5" base64-simd = "0.8.0" bytes = "1.9.0" chrono = { version = "0.4.38", default-features = false } @@ -107,6 +109,9 @@ diesel-async = { version = "0.5.2", features = [ "tokio", ] } diesel_full_text_search = { version = "2.2.0", default-features = false } +divan = "0.1.16" +either = { version = "1.13.0", default-features = false } +enum_dispatch = "0.3.13" eyre = "0.6.12" fred = { version = "10.0.0", features = [ "enable-rustls-ring", @@ -115,6 +120,7 @@ fred = { version = "10.0.0", features = [ "sha-1", "unix-sockets", ] } +futures-test = "0.3.31" futures-util = { version = "0.3.31", default-features = false, features = [ "alloc", ] } @@ -126,6 +132,7 @@ garde = { version = "0.20.0", features = [ "serde", ] } headers = "0.4.0" +hex-simd = "0.8.0" hickory-resolver = { version = "0.25.0-alpha.4", default-features = false, features = [ "dns-over-rustls", "native-certs", @@ -136,6 +143,7 @@ http-body = "1.0.1" http-body-util = "0.1.2" iso8601-timestamp = { version = "0.3.1", features = ["diesel-pg"] } itertools = { version = "0.13.0", default-features = false } +memchr = "2.7.4" mimalloc = "0.1.43" mime = "0.3.17" mime_guess = { version = "2.0.5", default-features = false } @@ -143,16 +151,19 @@ minijinja = { version = "2.5.0", features = ["loader"] } moka = { version = "=0.12.7", features = ["sync"] } pin-project-lite = "0.2.15" rand = "0.8.5" +regex = "1.11.1" sailfish = { version = "0.9.0", default-features = false, features = [ "derive", "perf-inline", ] } scoped-futures = { version = "0.1.4", default-features = false } serde = { version = "1.0.215", features = ["derive"] } +sha2 = "0.10.8" simdutf8 = { version = "0.1.5", features = ["aarch64_neon"] } smol_str = { version = "0.3.2", features = ["serde"] } sonic-rs = "=0.3.14" strum = { version = "0.26.3", features = ["derive"] } +subtle = "2.6.1" tempfile = "3.14.0" thiserror = "2.0.3" time = "0.3.36" @@ -183,6 +194,7 @@ triomphe = { version = "0.1.14", default-features = false, features = [ "unsize", ] } typed-builder = "0.20.0" +unsize = "1.1.0" url = "2.5.4" uuid = { version = "1.11.0", features = ["fast-rng", "v7"] } diff --git a/crates/kitsune-activitypub/Cargo.toml b/crates/kitsune-activitypub/Cargo.toml index adfadb23a..fdff633de 100644 --- a/crates/kitsune-activitypub/Cargo.toml +++ b/crates/kitsune-activitypub/Cargo.toml @@ -32,7 +32,7 @@ kitsune-wasm-mrf.workspace = true mime.workspace = true mime_guess.workspace = true serde.workspace = true -sha2 = "0.10.8" +sha2.workspace = true sonic-rs.workspace = true speedy-uuid.workspace = true tracing.workspace = true diff --git a/crates/kitsune-cache/Cargo.toml b/crates/kitsune-cache/Cargo.toml index 61ab5252b..ed381d9d8 100644 --- a/crates/kitsune-cache/Cargo.toml +++ b/crates/kitsune-cache/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true license.workspace = true [dependencies] -enum_dispatch = "0.3.13" +enum_dispatch.workspace = true fred.workspace = true kitsune-error.workspace = true moka.workspace = true diff --git a/crates/kitsune-captcha/Cargo.toml b/crates/kitsune-captcha/Cargo.toml index 8999d0347..6cfe9c4f5 100644 --- a/crates/kitsune-captcha/Cargo.toml +++ b/crates/kitsune-captcha/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true license.workspace = true [dependencies] -enum_dispatch = "0.3.13" +enum_dispatch.workspace = true http.workspace = true kitsune-error.workspace = true kitsune-http-client.workspace = true diff --git a/crates/kitsune-core/Cargo.toml b/crates/kitsune-core/Cargo.toml index ba1e4f1b8..7c3ddbac8 100644 --- a/crates/kitsune-core/Cargo.toml +++ b/crates/kitsune-core/Cargo.toml @@ -15,7 +15,7 @@ paste = "1.0.15" serde.workspace = true triomphe.workspace = true typed-builder.workspace = true -unsize = "1.1.0" +unsize.workspace = true [lints] workspace = true diff --git a/crates/kitsune-error/Cargo.toml b/crates/kitsune-error/Cargo.toml index 5eceeadb8..336a7488e 100644 --- a/crates/kitsune-error/Cargo.toml +++ b/crates/kitsune-error/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true license.workspace = true [dependencies] -axum-core = "0.4.5" +axum-core.workspace = true eyre.workspace = true garde.workspace = true http.workspace = true diff --git a/crates/kitsune-oidc/Cargo.toml b/crates/kitsune-oidc/Cargo.toml index f7546bdb7..c369194ce 100644 --- a/crates/kitsune-oidc/Cargo.toml +++ b/crates/kitsune-oidc/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true license.workspace = true [dependencies] -enum_dispatch = "0.3.13" +enum_dispatch.workspace = true fred.workspace = true http-body-util.workspace = true kitsune-config.workspace = true diff --git a/crates/kitsune-search/Cargo.toml b/crates/kitsune-search/Cargo.toml index 217554c2b..4728af2a3 100644 --- a/crates/kitsune-search/Cargo.toml +++ b/crates/kitsune-search/Cargo.toml @@ -11,7 +11,7 @@ bytes.workspace = true diesel.workspace = true diesel-async.workspace = true diesel_full_text_search.workspace = true -enum_dispatch = "0.3.13" +enum_dispatch.workspace = true futures-util.workspace = true http.workspace = true kitsune-config.workspace = true diff --git a/crates/kitsune-service/Cargo.toml b/crates/kitsune-service/Cargo.toml index 394fbcab4..e9da5b9bf 100644 --- a/crates/kitsune-service/Cargo.toml +++ b/crates/kitsune-service/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true license.workspace = true [dependencies] -ahash = "0.8.11" +ahash.workspace = true argon2.workspace = true asynk-strim.workspace = true athena.workspace = true @@ -56,7 +56,7 @@ url.workspace = true zxcvbn = { version = "3.1.0", default-features = false } [dev-dependencies] -hex-simd = "0.8.0" +hex-simd.workspace = true http-body-util.workspace = true hyper = "1.5.1" kitsune-activitypub.workspace = true diff --git a/crates/kitsune-wasm-mrf/Cargo.toml b/crates/kitsune-wasm-mrf/Cargo.toml index be794ceb4..a766109f6 100644 --- a/crates/kitsune-wasm-mrf/Cargo.toml +++ b/crates/kitsune-wasm-mrf/Cargo.toml @@ -11,7 +11,7 @@ async-trait.workspace = true blake3 = "1.5.5" color-eyre.workspace = true derive_more = { version = "1.0.0", features = ["from"] } -enum_dispatch = "0.3.13" +enum_dispatch.workspace = true fred.workspace = true futures-util.workspace = true http.workspace = true diff --git a/lib/athena/Cargo.toml b/lib/athena/Cargo.toml index fa334e9cb..d04409bca 100644 --- a/lib/athena/Cargo.toml +++ b/lib/athena/Cargo.toml @@ -10,9 +10,9 @@ name = "basic_queue" required-features = ["redis"] [dependencies] -ahash = "0.8.11" +ahash.workspace = true async-trait.workspace = true -either = { version = "1.13.0", default-features = false, optional = true } +either = { workspace = true, optional = true } futures-util.workspace = true iso8601-timestamp.workspace = true fred = { workspace = true, optional = true } @@ -29,7 +29,7 @@ tracing.workspace = true triomphe.workspace = true typed-builder.workspace = true typetag = "0.2.18" -unsize = "1.1.0" +unsize.workspace = true [features] redis = ["dep:either", "dep:fred", "dep:rand", "dep:sonic-rs"] diff --git a/lib/cursiv/Cargo.toml b/lib/cursiv/Cargo.toml index 200fed108..68b3c7aec 100644 --- a/lib/cursiv/Cargo.toml +++ b/lib/cursiv/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" aliri_braid = "0.4.0" blake3 = "1.5.5" cookie = { version = "0.18.1", features = ["percent-encode"] } -hex-simd = "0.8.0" +hex-simd.workspace = true http.workspace = true pin-project-lite.workspace = true rand.workspace = true @@ -19,10 +19,10 @@ zeroize = { version = "1.8.1", features = ["derive"] } # `axum` feature async-trait = { workspace = true, optional = true } -axum-core = { version = "0.4.5", optional = true } +axum-core = { workspace = true, optional = true } [dev-dependencies] -futures-test = "0.3.31" +futures-test.workspace = true tower.workspace = true [features] diff --git a/lib/fast-cjson/Cargo.toml b/lib/fast-cjson/Cargo.toml index 676b44a74..e7fe995d6 100644 --- a/lib/fast-cjson/Cargo.toml +++ b/lib/fast-cjson/Cargo.toml @@ -11,12 +11,12 @@ harness = false [dependencies] icu_normalizer = "1.5.0" -memchr = "2.7.4" +memchr.workspace = true serde.workspace = true sonic-rs.workspace = true [dev-dependencies] -divan = "0.1.16" +divan.workspace = true mimalloc.workspace = true olpc-cjson = "0.1.4" proptest = { version = "1.5.0", default-features = false, features = ["std"] } diff --git a/lib/geomjeungja/Cargo.toml b/lib/geomjeungja/Cargo.toml index a3122a33d..b8f9e1cf0 100644 --- a/lib/geomjeungja/Cargo.toml +++ b/lib/geomjeungja/Cargo.toml @@ -15,7 +15,7 @@ thiserror.workspace = true tracing.workspace = true triomphe.workspace = true typed-builder.workspace = true -unsize = "1.1.0" +unsize.workspace = true [dev-dependencies] insta = { version = "1.41.1", features = ["json"] } diff --git a/lib/http-signatures/Cargo.toml b/lib/http-signatures/Cargo.toml index b85b4c5d5..d84f868aa 100644 --- a/lib/http-signatures/Cargo.toml +++ b/lib/http-signatures/Cargo.toml @@ -32,7 +32,7 @@ tick-tock-mock.workspace = true tracing = { workspace = true, optional = true } [dev-dependencies] -divan = "0.1.16" +divan.workspace = true tokio.workspace = true [features] diff --git a/lib/masto-id-convert/Cargo.toml b/lib/masto-id-convert/Cargo.toml index d1a826024..9e909ca26 100644 --- a/lib/masto-id-convert/Cargo.toml +++ b/lib/masto-id-convert/Cargo.toml @@ -17,7 +17,7 @@ nanorand = { version = "0.7.0", default-features = false, features = [ uuid.workspace = true [dev-dependencies] -divan = "0.1.16" +divan.workspace = true time.workspace = true uuid.workspace = true diff --git a/lib/post-process/Cargo.toml b/lib/post-process/Cargo.toml index 30259326b..74d946453 100644 --- a/lib/post-process/Cargo.toml +++ b/lib/post-process/Cargo.toml @@ -13,7 +13,7 @@ harness = false logos = "0.14.2" [dev-dependencies] -divan = "0.1.16" +divan.workspace = true futures-executor = "0.3.31" insta = { version = "1.41.1", features = ["glob"] } pretty_assertions = "1.4.1" diff --git a/lib/tick-tock-mock/Cargo.toml b/lib/tick-tock-mock/Cargo.toml index ce8fa1786..aeff62a71 100644 --- a/lib/tick-tock-mock/Cargo.toml +++ b/lib/tick-tock-mock/Cargo.toml @@ -12,7 +12,7 @@ harness = false [dependencies] [dev-dependencies] -divan = "0.1.16" +divan.workspace = true [lints] workspace = true diff --git a/lib/tower-http-digest/Cargo.toml b/lib/tower-http-digest/Cargo.toml index b97b44d52..d7f27f7dd 100644 --- a/lib/tower-http-digest/Cargo.toml +++ b/lib/tower-http-digest/Cargo.toml @@ -8,20 +8,19 @@ license = "MIT OR Apache-2.0" [dependencies] base64-simd.workspace = true bytes.workspace = true -either = { version = "1.13.0", default-features = false } +either.workspace = true http.workspace = true http-body.workspace = true -memchr = "2.7.4" +memchr.workspace = true pin-project-lite.workspace = true -sha2 = "0.10.8" -subtle = "2.6.1" -tower-layer = "0.3.3" -tower-service = "0.3.3" +sha2.workspace = true +subtle.workspace = true +tower.workspace = true tracing.workspace = true [dev-dependencies] bytes.workspace = true -futures-test = "0.3.31" +futures-test.workspace = true http-body-util.workspace = true tower.workspace = true diff --git a/lib/tower-http-digest/src/lib.rs b/lib/tower-http-digest/src/lib.rs index 318d39b15..c22915833 100644 --- a/lib/tower-http-digest/src/lib.rs +++ b/lib/tower-http-digest/src/lib.rs @@ -9,16 +9,12 @@ use memchr::memchr; use pin_project_lite::pin_project; use sha2::{digest::FixedOutput, Digest, Sha256, Sha512}; use std::{ - error::Error as StdError, future::{self, Ready}, pin::Pin, task::{self, ready, Poll}, }; use subtle::ConstantTimeEq; -use tower_layer::Layer; -use tower_service::Service; - -type BoxError = Box; +use tower::{BoxError, Layer, Service}; static DIGEST_HEADER_NAME: HeaderName = HeaderName::from_static("digest"); diff --git a/lib/tower-http-digest/tests/digest.rs b/lib/tower-http-digest/tests/digest.rs index e1f821b4d..7f98d1943 100644 --- a/lib/tower-http-digest/tests/digest.rs +++ b/lib/tower-http-digest/tests/digest.rs @@ -2,9 +2,8 @@ use bytes::Bytes; use http::{Request, Response, StatusCode}; use http_body_util::{BodyExt, Full}; use std::convert::Infallible; -use tower::{service_fn, ServiceExt}; +use tower::{service_fn, Layer, ServiceExt}; use tower_http_digest::{VerifyDigestBody, VerifyDigestLayer}; -use tower_layer::Layer; const TEXT: &str = r"Una sombra abajo de mi cama Cómo se llama éste fantasma? diff --git a/lib/tower-stop-using-brave/Cargo.toml b/lib/tower-stop-using-brave/Cargo.toml index 329df7d1e..70e4fd09c 100644 --- a/lib/tower-stop-using-brave/Cargo.toml +++ b/lib/tower-stop-using-brave/Cargo.toml @@ -6,14 +6,13 @@ version.workspace = true license = "MIT OR Apache-2.0" [dependencies] -either = "1.13.0" +either.workspace = true http.workspace = true -regex = "1.11.1" -tower-layer = "0.3.3" -tower-service = "0.3.3" +regex.workspace = true +tower.workspace = true [dev-dependencies] -futures-test = "0.3.31" +futures-test.workspace = true tower.workspace = true [lints] diff --git a/lib/tower-stop-using-brave/src/lib.rs b/lib/tower-stop-using-brave/src/lib.rs index 647cdef81..d136f0f83 100644 --- a/lib/tower-stop-using-brave/src/lib.rs +++ b/lib/tower-stop-using-brave/src/lib.rs @@ -9,8 +9,7 @@ use std::{ sync::LazyLock, task::{self, Poll}, }; -use tower_layer::Layer; -use tower_service::Service; +use tower::{Layer, Service}; static REDIRECT_URL: &str = "https://www.spacebar.news/stop-using-brave-browser/"; static USER_AGENT_REGEX: LazyLock = LazyLock::new(|| { diff --git a/lib/tower-x-clacks-overhead/Cargo.toml b/lib/tower-x-clacks-overhead/Cargo.toml index c4356e588..a36d92724 100644 --- a/lib/tower-x-clacks-overhead/Cargo.toml +++ b/lib/tower-x-clacks-overhead/Cargo.toml @@ -9,12 +9,11 @@ license = "MIT OR Apache-2.0" http.workspace = true itertools.workspace = true pin-project-lite.workspace = true -tower-layer = "0.3.3" -tower-service = "0.3.3" +tower.workspace = true triomphe.workspace = true [dev-dependencies] -futures-test = "0.3.31" +futures-test.workspace = true tower.workspace = true [lints] diff --git a/lib/tower-x-clacks-overhead/src/lib.rs b/lib/tower-x-clacks-overhead/src/lib.rs index 83ab9a9c2..43f443d5d 100644 --- a/lib/tower-x-clacks-overhead/src/lib.rs +++ b/lib/tower-x-clacks-overhead/src/lib.rs @@ -5,8 +5,7 @@ use std::{ pin::Pin, task::{self, Poll}, }; -use tower_layer::Layer; -use tower_service::Service; +use tower::{Layer, Service}; use triomphe::Arc; static HEADER_NAME: HeaderName = HeaderName::from_static("x-clacks-overhead"); @@ -122,8 +121,7 @@ mod test { use crate::{XClacksOverheadLayer, HEADER_NAME}; use http::{Request, Response}; use std::convert::Infallible; - use tower::{service_fn, ServiceExt}; - use tower_layer::Layer; + use tower::{service_fn, Layer, ServiceExt}; #[futures_test::test] async fn add_header() { diff --git a/lib/trials/Cargo.toml b/lib/trials/Cargo.toml index a62e8d21e..8ca224bad 100644 --- a/lib/trials/Cargo.toml +++ b/lib/trials/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] [dev-dependencies] -futures-test = "0.3.31" +futures-test.workspace = true [lints] workspace = true