Skip to content

Commit

Permalink
rust beta that breaks stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Mar 29, 2024
1 parent 5b814bf commit b1ef0ed
Show file tree
Hide file tree
Showing 39 changed files with 259 additions and 102 deletions.
265 changes: 210 additions & 55 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,5 @@ install-updater = true

[patch.crates-io]
diesel-async = { git = "https://github.com/weiznich/diesel_async.git", rev = "017ebe2fb7a2709ab5db92148dea5ce812a35e09" }
scoped-futures = { path = "../../scoped-futures" }
tokio-postgres-rustls = { git = "https://github.com/jbg/tokio-postgres-rustls.git", rev = "b3b59ac2fa1b5823f2426fef78a0fb74c004ec38" }
2 changes: 1 addition & 1 deletion crates/kitsune-activitypub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ kitsune-config = { path = "../kitsune-config" }
kitsune-test = { path = "../kitsune-test" }
kitsune-webfinger = { path = "../kitsune-webfinger" }
pretty_assertions = "1.4.0"
tokio = { version = "1.36.0", features = ["macros"] }
tokio = { version = "1.37.0", features = ["macros"] }
tower = { version = "0.4.13", default-features = false, features = ["util"] }

[lints]
Expand Down
4 changes: 2 additions & 2 deletions crates/kitsune-cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version.workspace = true
license.workspace = true

[dependencies]
enum_dispatch = "0.3.12"
enum_dispatch = "0.3.13"
moka = { version = "0.12.5", features = ["future"] }
multiplex-pool = { path = "../../lib/multiplex-pool" }
redis = { version = "0.25.2", default-features = false, features = [
Expand All @@ -20,7 +20,7 @@ tracing = "0.1.40"
typed-builder = "0.18.1"

[dev-dependencies]
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/kitsune-captcha/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
license.workspace = true

[dependencies]
enum_dispatch = "0.3.12"
enum_dispatch = "0.3.13"
http = "1.1.0"
kitsune-http-client = { path = "../kitsune-http-client" }
serde = { version = "1.0.197", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ isolang = { version = "2.4.0", features = ["serde"] }
miette = "7.2.0"
serde = { version = "1.0.197", features = ["derive"] }
smol_str = { version = "0.2.1", features = ["serde"] }
tokio = { version = "1.36.0", features = ["fs"] }
tokio = { version = "1.37.0", features = ["fs"] }
toml = { version = "0.8.12", default-features = false, features = ["parse"] }

[lints]
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-core/src/traits/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use typed_builder::TypedBuilder;
#[derive(Clone, Copy, Debug, TypedBuilder)]
/// Options passed to the fetcher
pub struct AccountFetchOptions<'a> {
/// Prefetched WebFinger `acct` URI
/// Prefetched Webfinger `acct` URI
#[builder(default, setter(strip_option))]
pub acct: Option<(&'a str, &'a str)>,

Expand Down
6 changes: 3 additions & 3 deletions crates/kitsune-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ kitsune-type = { path = "../kitsune-type" }
miette = "7.2.0"
num-derive = "0.4.2"
num-traits = "0.2.18"
rustls = "=0.22.2"
rustls = "0.23.4"
rustls-native-certs = "0.7.0"
serde = { version = "1.0.197", features = ["derive"] }
simd-json = "0.13.9"
speedy-uuid = { path = "../../lib/speedy-uuid", features = ["diesel"] }
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["rt"] }
tokio = { version = "1.37.0", features = ["rt"] }
tokio-postgres = "0.7.10"
tokio-postgres-rustls = "0.11.1"
tracing = "0.1.40"
Expand All @@ -42,7 +42,7 @@ typed-builder = "0.18.1"

[dev-dependencies]
kitsune-test = { path = "../kitsune-test" }
tokio = { version = "1.36.0", features = ["macros"] }
tokio = { version = "1.37.0", features = ["macros"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/kitsune-email/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ diesel = "2.1.5"
diesel-async = "0.4.1"
kitsune-db = { path = "../kitsune-db" }
kitsune-url = { path = "../kitsune-url" }
lettre = { version = "0.11.5", default-features = false, features = [
lettre = { version = "0.11.6", default-features = false, features = [
"builder",
"hostname",
"pool",
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-http-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tower-http = { version = "0.5.2", features = [
] }

[dev-dependencies]
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/kitsune-mastodon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ simd-json = "0.13.9"
smol_str = "0.2.1"
speedy-uuid = { path = "../../lib/speedy-uuid" }
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["rt"] }
tokio = { version = "1.37.0", features = ["rt"] }
tracing = "0.1.40"
typed-builder = "0.18.1"

Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-messaging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pin-project-lite = "0.2.13"
redis = { version = "0.25.2", features = ["connection-manager", "tokio-comp"] }
serde = "1.0.197"
simd-json = "0.13.9"
tokio = { version = "1.36.0", features = ["macros", "rt", "sync"] }
tokio = { version = "1.37.0", features = ["macros", "rt", "sync"] }
tokio-stream = { version = "0.1.15", features = ["sync"] }
tracing = "0.1.40"

Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-observability/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ miette = "7.2.0"
opentelemetry = { version = "0.22.0", default-features = false, features = [
"trace",
] }
opentelemetry-http = "0.11.0"
opentelemetry-http = "0.11.1"
opentelemetry-otlp = { version = "0.15.0", default-features = false, features = [
"grpc-tonic",
"http-proto",
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-oidc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version.workspace = true
license.workspace = true

[dependencies]
enum_dispatch = "0.3.12"
enum_dispatch = "0.3.13"
http = "1.1.0"
http-compat = { path = "../../lib/http-compat" }
kitsune-config = { path = "../kitsune-config" }
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ typed-builder = "0.18.1"

[dev-dependencies]
kitsune-test = { path = "../kitsune-test" }
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[lints]
workspace = true
4 changes: 2 additions & 2 deletions crates/kitsune-s3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const fn s3_method_to_http(method: rusty_s3::Method) -> http::Method {
}

#[inline]
const fn http_method_by_value<'a, T: ?Sized>(_: &T) -> http::Method
const fn http_method_by_value<'a, T>(_: &T) -> http::Method
where
T: S3Action<'a>,
T: S3Action<'a> + ?Sized,
{
s3_method_to_http(T::METHOD)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-search/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ignored = ["isahc"] # To make `meilisearch` builds static
diesel = "2.1.5"
diesel-async = "0.4.1"
diesel_full_text_search = { version = "2.1.1", default-features = false }
enum_dispatch = "0.3.12"
enum_dispatch = "0.3.13"
futures-util = "0.3.30"
kitsune-config = { path = "../kitsune-config" }
kitsune-db = { path = "../kitsune-db" }
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ simd-json = "0.13.9"
smol_str = "0.2.1"
speedy-uuid = { path = "../../lib/speedy-uuid" }
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["macros", "sync"] }
tokio = { version = "1.37.0", features = ["macros", "sync"] }
tracing = "0.1.40"
typed-builder = "0.18.1"
url = "2.5.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/kitsune-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ derive_more = { version = "1.0.0-beta.6", features = ["from"] }
futures-util = "0.3.30"
kitsune-s3 = { path = "../kitsune-s3" }
rusty-s3 = { version = "0.5.0", default-features = false }
tokio = { version = "1.36.0", features = ["fs", "io-util"] }
tokio = { version = "1.37.0", features = ["fs", "io-util"] }
tokio-util = { version = "0.7.10", features = ["io"] }

[dev-dependencies]
tempfile = "3.10.1"
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/kitsune-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ testcontainers-modules = { version = "0.3.6", features = [
"postgres",
"redis",
] }
tokio = { version = "1.36.0", features = ["time"] }
tokio = { version = "1.37.0", features = ["time"] }
url = "2.5.0"
uuid = { version = "1.8.0", features = ["fast-rng", "v4"] }

Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pulldown-cmark = { version = "0.10.0", default-features = false, features = [
] }
rand = "0.8.5"
speedy-uuid = { path = "../../lib/speedy-uuid" }
tokio = { version = "1.36.0", features = ["macros"] }
tokio = { version = "1.37.0", features = ["macros"] }

[lints]
workspace = true
6 changes: 3 additions & 3 deletions crates/kitsune-wasm-mrf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build = "build.rs"
[dependencies]
async-trait = "0.1.79"
derive_more = { version = "1.0.0-beta.6", features = ["from"] }
enum_dispatch = "0.3.12"
enum_dispatch = "0.3.13"
futures-util = { version = "0.3.30", default-features = false, features = [
"alloc",
] }
Expand All @@ -27,7 +27,7 @@ slab = "0.4.9"
sled = "0.34.7"
smol_str = "0.2.1"
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["fs"] }
tokio = { version = "1.37.0", features = ["fs"] }
tracing = "0.1.40"
typed-builder = "0.18.1"
walkdir = "2.5.0"
Expand All @@ -44,7 +44,7 @@ wasmtime-wasi = { version = "19.0.0", default-features = false }

[dev-dependencies]
tempfile = "3.10.1"
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }
tracing-subscriber = "0.3.18"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion crates/kitsune-wasm-mrf/example-mrf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]

[dependencies]
rand = "0.8.5"
wit-bindgen = "0.22.0"
wit-bindgen = "0.23.0"

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/kitsune-webfinger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ http-body-util = "0.1.1"
hyper = "1.2.0"
pretty_assertions = "1.4.0"
simd-json = "0.13.9"
tokio = { version = "1.36.0", features = ["macros"] }
tokio = { version = "1.37.0", features = ["macros"] }
tower = { version = "0.4.13", default-features = false, features = ["util"] }

[lints]
Expand Down
2 changes: 1 addition & 1 deletion kitsune-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ kitsune-db = { path = "../crates/kitsune-db" }
miette = { version = "7.2.0", features = ["fancy"] }
serde = { version = "1.0.197", features = ["derive"] }
speedy-uuid = { path = "../lib/speedy-uuid" }
tokio = { version = "1.36.0", features = ["full"] }
tokio = { version = "1.37.0", features = ["full"] }
tracing-subscriber = "0.3.18"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion kitsune-job-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ redis = { version = "0.25.2", default-features = false, features = [
"connection-manager",
"tokio-rustls-comp",
] }
tokio = { version = "1.36.0", features = ["full"] }
tokio = { version = "1.37.0", features = ["full"] }
tracing = "0.1.40"
typed-builder = "0.18.1"

Expand Down
2 changes: 1 addition & 1 deletion kitsune/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ strum = { version = "0.26.2", features = ["derive", "phf"] }
tempfile = "3.10.1"
thiserror = "1.0.58"
time = "0.3.34"
tokio = { version = "1.36.0", features = ["full"] }
tokio = { version = "1.37.0", features = ["full"] }
tokio-util = { version = "0.7.10", features = ["compat"] }
tower-stop-using-brave = { path = "../lib/tower-stop-using-brave" }
tower-x-clacks-overhead = { path = "../lib/tower-x-clacks-overhead" }
Expand Down
2 changes: 1 addition & 1 deletion lib/athena/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ simd-json = "0.13.9"
smol_str = "0.2.1"
speedy-uuid = { path = "../speedy-uuid", features = ["redis", "serde"] }
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["macros", "rt", "sync"] }
tokio = { version = "1.37.0", features = ["macros", "rt", "sync"] }
tokio-util = { version = "0.7.10", features = ["rt"] }
tracing = "0.1.40"
typed-builder = "0.18.1"
Expand Down
2 changes: 1 addition & 1 deletion lib/blowocking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
once_cell = "1.19.0"
rayon = "1.10.0"
thiserror = "1.0.58"
tokio = { version = "1.36.0", features = ["sync"] }
tokio = { version = "1.37.0", features = ["sync"] }
tracing = "0.1.40"

[features]
Expand Down
5 changes: 3 additions & 2 deletions lib/cursiv/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ fn raw_verify(key: &[u8; blake3::KEY_LEN], hash: &HashRef, message: &MessageRef)
impl CsrfHandle {
/// Keep the current signature and message inside the cookie
#[inline]
#[allow(clippy::assigning_clones)] // `.clone_from` usage won't work because of the mutex without trying way too hard
pub fn keep_cookie(&self) {
let mut guard = self.inner.lock().unwrap();
guard.set_data = guard.read_data.clone();
let inner = &mut *self.inner.lock().unwrap();
inner.set_data.clone_from(&inner.read_data);
}

/// Create a signature and store it inside a cookie
Expand Down
4 changes: 2 additions & 2 deletions lib/geomjeungja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ tracing = "0.1.40"
typed-builder = "0.18.1"

[dev-dependencies]
insta = { version = "1.37.0", features = ["json"] }
insta = { version = "1.38.0", features = ["json"] }
rand_xorshift = "0.3.0"
serde_json = "1.0.115"
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion lib/http-signatures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tracing = { version = "0.1.40", default-features = false, optional = true }
[dev-dependencies]
criterion = "0.5.1"
proptest = { version = "1.4.0", default-features = false, features = ["std"] }
tokio = { version = "1.36.0", features = ["macros", "rt"] }
tokio = { version = "1.37.0", features = ["macros", "rt"] }

[features]
default = ["easy"]
Expand Down
2 changes: 1 addition & 1 deletion lib/http-signatures/src/cavage/easy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub async fn sign<B>(
/// You don't need to supply any more information. The library will figure out the rest.
#[inline]
#[instrument(skip_all)]
pub async fn verify<'a, B, F, Fut, E>(req: &http::Request<B>, get_key: F) -> Result<(), Error>
pub async fn verify<'a, B, F, Fut, E>(req: &'a http::Request<B>, get_key: F) -> Result<(), Error>
where
for<'k_id> F: Fn(&'k_id str) -> ScopedFutureWrapper<'k_id, 'a, Fut>,
Fut: Future<Output = Result<String, E>>,
Expand Down
2 changes: 1 addition & 1 deletion lib/just-retry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
chrono = { version = "0.4.37", default-features = false, features = ["std"] }
retry-policies = "0.3.0"
tokio = { version = "1.36.0", features = ["time"] }
tokio = { version = "1.37.0", features = ["time"] }
tracing = "0.1.40"

[lints]
Expand Down
3 changes: 1 addition & 2 deletions lib/masto-id-convert/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ where
}

#[cfg(test)]
#[allow(clippy::unreadable_literal)]
mod test {
#![allow(clippy::unreadable_literal)]

use time::{Month, OffsetDateTime};

// ID nabbed from this post: <https://hachyderm.io/@samhenrigold/112094325204679902>
Expand Down
2 changes: 1 addition & 1 deletion lib/mrf-manifest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ wasmparser = { version = "0.202.0", optional = true }

[dev-dependencies]
serde_json = "1.0.115"
insta = { version = "1.37.0", default-features = false, features = ["json"] }
insta = { version = "1.38.0", default-features = false, features = ["json"] }
wat = "1.202.0"

[features]
Expand Down
2 changes: 1 addition & 1 deletion lib/post-process/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ logos = "0.14.0"
[dev-dependencies]
criterion = { version = "0.5.1", features = ["async_futures"] }
futures = "0.3.30"
insta = { version = "1.37.0", features = ["glob"] }
insta = { version = "1.38.0", features = ["glob"] }
pretty_assertions = "1.4.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion lib/tower-http-digest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bytes = "1.6.0"
either = { version = "1.10.0", default-features = false }
http = "1.1.0"
http-body = "1.0.0"
memchr = "2.7.1"
memchr = "2.7.2"
pin-project-lite = "0.2.13"
sha2 = "0.10.8"
subtle = "2.5.0"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "stable"
channel = "beta"
components = ["clippy", "rustfmt"]
profile = "default"

0 comments on commit b1ef0ed

Please sign in to comment.