We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c29b74 commit 01421c8Copy full SHA for 01421c8
crates/schema_cache/src/lib.rs
@@ -11,19 +11,17 @@ use sqlx::postgres::PgPool;
11
12
#[derive(Debug, Clone)]
13
struct SchemaCacheManager {
14
- pool: PgPool,
15
pub cache: SchemaCache,
16
}
17
18
impl SchemaCacheManager {
19
- pub async fn init(pool: PgPool) -> Self {
+ pub async fn init(pool: &PgPool) -> Self {
20
SchemaCacheManager {
21
- cache: SchemaCache::load(&pool).await,
22
- pool,
+ cache: SchemaCache::load(pool).await,
23
24
25
26
- pub async fn reload_cache(&mut self) {
27
- self.cache = SchemaCache::load(&self.pool).await;
+ pub async fn reload_cache(&mut self, pool: &PgPool) {
+ self.cache = SchemaCache::load(pool).await;
28
29
0 commit comments