-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
// This doesn't work instead:
let db_repo = if use_postgres {
let pg_pool = Arc::new(sqlx::PgPool::connect("postgres://postgres:postgres@localhost:5432/postgres").await.unwrap());
Arc::new(repositories::postgres::Repo::new(pg_pool))
} else {
Arc::new(repositories::in_memory::Repo::new())
};repositories::postgres::Repo
and
repositories::in_memory::Repo
have nothing in common and do not share a Repository trait. of course they are not compatible
Metadata
Metadata
Assignees
Labels
No labels