chore: update to edition 2024; update packages; rename some stuff
This commit is contained in:
parent
82e52bc8f9
commit
275d249320
48 changed files with 359 additions and 208 deletions
|
|
@ -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
16
gpodder/Justfile
Normal 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
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue