refactor: remove where in favor of <T: > for generics
All checks were successful
/ test (push) Successful in 3m22s

This commit is contained in:
Ninjdai 2025-08-20 09:39:35 +02:00
parent 44ba33035f
commit 1566363e8f
6 changed files with 12 additions and 27 deletions

View file

@ -56,8 +56,7 @@ fn free_local_ipv4_port() -> Option<u16> {
.ok()
}
async fn create_user<C>(db_conn: &C, username_t: impl ToString, password_t: impl ToString)
where C: ConnectionTrait {
async fn create_user<C: ConnectionTrait>(db_conn: &C, username_t: impl ToString, password_t: impl ToString) {
let username = username_t.to_string();
if User::find().filter(user::Column::Username.eq(username.clone())).one(db_conn).await.is_ok_and(|r| r.is_some()) {
panic!("Username {username} already in use");