Browse Source

clippy found some new problems

pull/121/head
jake 2 years ago
parent
commit
27931adb5a
  1. 12
      src/entity/gateway/postgres/postgres.rs

12
src/entity/gateway/postgres/postgres.rs

@ -162,10 +162,10 @@ async fn save_user(conn: &mut sqlx::PgConnection, user: &UserAccountEntity) -> R
sqlx::query("UPDATE user_accounts set username=$1, password=$2, banned=$3, muted=$4, flags=$5 where id=$6")
.bind(&user.username)
.bind(&user.password)
.bind(&user.banned_until)
.bind(&user.muted_until)
.bind(&user.flags)
.bind(&user.id.0)
.bind(user.banned_until)
.bind(user.muted_until)
.bind(user.flags)
.bind(user.id.0)
.execute(conn).await?;
Ok(())
}
@ -200,11 +200,11 @@ async fn save_user_settings(conn: &mut sqlx::PgConnection, settings: &UserSettin
.bind(settings.settings.blocked_users.iter().copied().flat_map(|i| i.to_le_bytes().to_vec()).collect::<Vec<u8>>())
.bind(&settings.settings.keyboard_config.to_vec())
.bind(&settings.settings.gamepad_config.to_vec())
.bind(&settings.settings.option_flags)
.bind(settings.settings.option_flags)
.bind(&settings.settings.shortcuts.to_vec())
.bind(&settings.settings.symbol_chats.to_vec())
.bind(settings.settings.team_name.iter().copied().flat_map(|i| i.to_le_bytes().to_vec()).collect::<Vec<u8>>())
.bind(&settings.id.0)
.bind(settings.id.0)
.fetch_one(conn).await?;
Ok(())
}

Loading…
Cancel
Save