clippy fixes

This commit is contained in:
Robin Appelman 2024-12-24 16:38:01 +01:00
commit c4aa610433
2 changed files with 8 additions and 11 deletions

View file

@ -1,7 +1,7 @@
use demostf_client::ApiClient;
use sqlx::{Pool, Postgres};
use color_eyre::Result;
use demostf_client::ApiClient;
use sqlx::postgres::PgPoolOptions;
use sqlx::{Pool, Postgres};
pub struct Harness {
client: ApiClient,
@ -13,14 +13,11 @@ impl Harness {
let client = ApiClient::with_base_url(base_url)?;
let db = PgPoolOptions::new()
.max_connections(5)
.connect(&db_url)
.connect(db_url)
.await
.unwrap();
Ok(Harness {
client,
db,
})
Ok(Harness { client, db })
}
pub async fn reset(&self) -> Result<()> {

View file

@ -310,7 +310,7 @@ async fn main() -> Result<()> {
assert_eq(list.len(), 1)?;
assert_eq(list[0].id, 4)?;
let players = list[0].get_players(&client).await?;
let players = list[0].get_players(client).await?;
let reconnected_player = players
.iter()
.find(|player| player.user.steam_id == SteamID::from(76561197998883586))
@ -364,7 +364,7 @@ async fn main() -> Result<()> {
test.step("list time filter after", |client| async move {
let list = client
.list(ListParams::default().with_after(first_time.clone()), 1)
.list(ListParams::default().with_after(first_time), 1)
.await?;
assert_eq(list.len(), 2)?;
@ -376,7 +376,7 @@ async fn main() -> Result<()> {
test.step("list time filter before", |client| async move {
let list = client
.list(ListParams::default().with_before(first_time.clone()), 1)
.list(ListParams::default().with_before(first_time), 1)
.await?;
assert_eq(list.len(), 2)?;