chore: update to edition 2024; update packages; rename some stuff

This commit is contained in:
Jef Roosens 2025-06-06 12:33:26 +02:00
parent 82e52bc8f9
commit 275d249320
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
48 changed files with 359 additions and 208 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "gpodder"
version = "0.1.0"
edition = "2021"
version.workspace = true
edition.workspace = true
[dependencies]
rand = { workspace = true }

16
gpodder/Justfile Normal file
View file

@ -0,0 +1,16 @@
build:
cargo build --frozen
alias b := build
test:
cargo test --frozen
alias t := test
check:
cargo fmt --check
cargo clippy \
--frozen \
-- \
--no-deps \
--deny 'clippy::all'
alias c := check

View file

@ -1,8 +1,8 @@
use std::{collections::HashSet, sync::Arc};
use argon2::{password_hash::SaltString, Argon2, PasswordHash, PasswordHasher, PasswordVerifier};
use argon2::{Argon2, PasswordHash, PasswordHasher, PasswordVerifier, password_hash::SaltString};
use chrono::{DateTime, TimeDelta, Utc};
use rand::{rngs::OsRng, Rng};
use rand::{Rng, rngs::OsRng};
use crate::{
models,
@ -85,7 +85,7 @@ impl GpodderRepository {
user_agent: Option<String>,
) -> Result<models::Session, AuthErr> {
let session = models::Session {
id: rand::thread_rng().gen(),
id: rand::thread_rng().r#gen(),
last_seen: Utc::now(),
user: user.clone(),
user_agent,