fix: rand moved things around
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
əlemi 2025-01-29 15:44:08 +01:00
parent 4df61c3bfc
commit 9ecb095f46
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 2 deletions

View file

@ -75,6 +75,7 @@ fn main() {
}
}
#[cfg(feature = "web")]
fn if_matches_set_env_path(var: &str, f: &std::fs::DirEntry, fname: &str, first: &str, last: &str) -> bool {
if fname.starts_with(first) && fname.ends_with(last) {
match f.path().canonicalize() {

View file

@ -19,8 +19,8 @@ pub struct AuthSuccess {
fn token() -> String {
// TODO should probably use crypto-safe rng
rand::thread_rng()
.sample_iter(&rand::distributions::Alphanumeric)
rand::rng()
.sample_iter(&rand::distr::Alphanumeric)
.take(128)
.map(char::from)
.collect()