Skip to content

Commit

Permalink
fix(clippy): fixing updated clippy dead code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother committed Jun 20, 2024
1 parent 8b7d285 commit 2648711
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/context/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use {
self::server::EchoServer,
async_trait::async_trait,
echo_server::{
config::Config,
state::{ClientStoreArc, NotificationStoreArc, TenantStoreArc},
},
echo_server::config::Config,
sqlx::{Pool, Postgres},
std::{env, sync::Arc},
test_context::{AsyncTestContext, TestContext},
Expand All @@ -19,16 +16,11 @@ pub struct ConfigContext {

pub struct EchoServerContext {
pub server: EchoServer,
pub config: Config,
}

pub struct StoreContext {
pub pool: Arc<Pool<Postgres>>,
pub tenant_pool: Arc<Pool<Postgres>>,

pub clients: ClientStoreArc,
pub notifications: NotificationStoreArc,
pub tenants: TenantStoreArc,
}

impl TestContext for ConfigContext {
Expand Down Expand Up @@ -92,9 +84,9 @@ impl TestContext for ConfigContext {
#[async_trait]
impl AsyncTestContext for EchoServerContext {
async fn setup() -> Self {
let config = ConfigContext::setup().config;
let server = EchoServer::start(ConfigContext::setup().config).await;
Self { server, config }
Self {
server: EchoServer::start(ConfigContext::setup().config).await,
}
}

async fn teardown(mut self) {
Expand All @@ -115,9 +107,6 @@ impl AsyncTestContext for StoreContext {
Self {
pool: db_arc.clone(),
tenant_pool: tenant_db_arc.clone(),
clients: db_arc.clone(),
notifications: db_arc.clone(),
tenants: tenant_db_arc.clone(),
}
}

Expand Down

0 comments on commit 2648711

Please sign in to comment.