From 0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 Jul 2026 18:23:39 +0200 Subject: chore(server): Remove warnings --- crates/server/src/database/db/mod.rs | 10 +++++----- crates/server/src/database/db/wrappers.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/server/src/database/db') diff --git a/crates/server/src/database/db/mod.rs b/crates/server/src/database/db/mod.rs index c95a2ed4..9345ff6b 100644 --- a/crates/server/src/database/db/mod.rs +++ b/crates/server/src/database/db/mod.rs @@ -15,7 +15,7 @@ mod wrappers; const MIN_PG_VERSION: u32 = 14; #[derive(Clone)] -pub struct ServerPostgres { +pub(crate) struct ServerPostgres { pool: sqlx::Pool, /// Optional read replica pool for read-only queries read_pool: Option>, @@ -30,7 +30,7 @@ impl ServerPostgres { } impl ServerPostgres { - pub async fn new(settings: &DbSettings) -> DbResult { + pub(crate) async fn new(settings: &DbSettings) -> DbResult { let pool = PgPoolOptions::new() .max_connections(100) .connect(settings.db_uri.as_str()) @@ -91,7 +91,7 @@ impl ServerPostgres { } #[instrument(skip_all)] - pub async fn add_records( + pub(crate) async fn add_records( &self, user: &User, records: &[Record], @@ -167,7 +167,7 @@ impl ServerPostgres { } #[instrument(skip_all)] - pub async fn next_records( + pub(crate) async fn next_records( &self, user: &User, host: HostId, @@ -220,7 +220,7 @@ impl ServerPostgres { Ok(ret) } - pub async fn status(&self, user: &User) -> DbResult { + pub(crate) async fn status(&self, user: &User) -> DbResult { // If IDX_CACHE_ROLLOUT is set, then we // 1. Read the value of the var, use it as a % chance of using the cache // 2. If we use the cache, just read from the cache table diff --git a/crates/server/src/database/db/wrappers.rs b/crates/server/src/database/db/wrappers.rs index 8054289a..6bacf47f 100644 --- a/crates/server/src/database/db/wrappers.rs +++ b/crates/server/src/database/db/wrappers.rs @@ -1,7 +1,7 @@ use turtle_common::record::{EncryptedData, Host, Record}; use sqlx::{Row, postgres::PgRow}; -pub struct DbRecord(pub Record); +pub(crate) struct DbRecord(pub(crate) Record); impl<'a> ::sqlx::FromRow<'a, PgRow> for DbRecord { fn from_row(row: &'a PgRow) -> ::sqlx::Result { -- cgit v1.3.1