1 Commits

Author SHA1 Message Date
154b6d5227 Update Rust crate validator to 0.20.0
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/audit unknown status
2025-05-03 00:01:48 +00:00
5 changed files with 11 additions and 20 deletions

View File

@@ -13,7 +13,7 @@ config = "./spellcheck.toml"
[dependencies]
# Errors
anyhow = "1.0.75"
thiserror = "2.0.0"
thiserror = "1.0.50"
# Async
async-std = "1.12.0"
@@ -26,10 +26,10 @@ tokio-stream = "0.1.15"
# Utils
base64 = "0.22.0"
const_format = "0.2.32"
rand = "0.9.1"
rand = "0.8.5"
validator = { version = "0.20.0", features = ["derive"] }
# Http client
reqwest = "0.12.0"
reqwest = "0.11.24"
# Password strength estimation
zxcvbn = "2.2.2"
# Image processing/conversion
@@ -44,16 +44,13 @@ tracing = "0.1.40"
tracing-forest = "0.1.6"
# SCSS -> CSS + usage in rust code
turf = "0.10.0"
turf = "0.9.3"
# Dioxus
dioxus-free-icons = { version = "0.9", features = ["ionicons", "font-awesome-solid"] }
modx = "0.1.4"
[target.'cfg(target_family = "wasm")'.dependencies]
# Utils
getrandom = { version = "0.3.2", features = ["wasm_js"] }
# Logging/tracing
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-web = "0.1.3"
@@ -68,7 +65,6 @@ matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk.git", rev =
[target.'cfg(not(target_family = "wasm"))'.dependencies]
# Utils
time = "0.3.36"
getrandom = { version = "0.3.2" }
# Logging/tracing
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "time"] }
@@ -79,9 +75,6 @@ dioxus = { version = "0.6.3", features = ["desktop"] }
# Matrix
matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk.git", rev = "fa6066b8", default-features = false, features = ["rustls-tls"] }
[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
[build-dependencies]
regex = "1.10.3"

View File

@@ -14,8 +14,6 @@ RUN apt update \
COPY . .
# Workaround waiting for the dioxus 0.7 release (cf. https://github.com/DioxusLabs/dioxus/issues/4238)
ENV RUSTFLAGS="--cfg getrandom_backend=\"wasm_js\""
RUN dx build -r --platform web -- -j ${JOBS_NB}

View File

@@ -124,7 +124,7 @@ fn export_variables(tasks: Vec<Task>) {
"#[allow(dead_code)]\nmod {} {{\n",
task.module_name
)) {
println!("{err}");
println!("{}", err);
return;
};
@@ -143,14 +143,14 @@ fn export_variables(tasks: Vec<Task>) {
}
for variable in variables {
if let Err(err) = dst_file.write_fmt(format_args!(" pub {variable}\n")) {
println!("{err}");
if let Err(err) = dst_file.write_fmt(format_args!(" pub {}\n", variable)) {
println!("{}", err);
break;
}
}
if let Err(err) = dst_file.write(b"}\n") {
println!("{err}");
println!("{}", err);
};
}
}

View File

@@ -1,4 +1,4 @@
FROM rust:1.88 AS builder
FROM rust:1.86 AS builder
RUN apt update \
&& apt install -y --no-install-recommends libclang-dev hunspell \

View File

@@ -3,7 +3,7 @@ use std::future::Future;
use std::sync::OnceLock;
use std::{collections::HashMap, future::IntoFuture};
use rand::distr::{Alphanumeric, SampleString};
use rand::distributions::{Alphanumeric, DistString};
use reqwest::Result as RequestResult;
use tracing::error;
@@ -124,7 +124,7 @@ async fn fetch_dicebear_svg(
// TODO: Use configuration file
let url = "dicebear.tools.adrien.run";
let seed = Alphanumeric.sample_string(&mut rand::rng(), 16);
let seed = Alphanumeric.sample_string(&mut rand::thread_rng(), 16);
let type_str = r#type.to_string();
let url = format!(
"https://{url}/8.x/{type_str}/svg?seed={seed}&randomizeIds=true{}{}",