about summary refs log tree commit diff
path: root/src/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/database')
-rw-r--r--src/database/postgres/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/postgres/mod.rs b/src/database/postgres/mod.rs
index 0ebaffb..7f788a8 100644
--- a/src/database/postgres/mod.rs
+++ b/src/database/postgres/mod.rs
@@ -1,5 +1,4 @@
 use std::borrow::Cow;
-use std::str::FromStr;
 
 use kittybox_util::{MicropubChannel, MentionType};
 use sqlx::{ConnectOptions, Executor, PgPool};
@@ -30,6 +29,7 @@ impl From<sqlx::migrate::MigrateError> for StorageError {
     }
 }
 
+/// Micropub storage that uses a PostgreSQL database.
 #[derive(Debug, Clone)]
 pub struct PostgresStorage {
     db: PgPool
@@ -38,7 +38,7 @@ pub struct PostgresStorage {
 impl PostgresStorage {
     /// Construct a [`PostgresStorage`] from a [`sqlx::PgPool`],
     /// running appropriate migrations.
-    pub async fn from_pool(db: sqlx::PgPool) -> Result<Self> {
+    pub(crate) async fn from_pool(db: sqlx::PgPool) -> Result<Self> {
         db.execute(sqlx::query("CREATE SCHEMA IF NOT EXISTS kittybox")).await?;
         MIGRATOR.run(&db).await?;
         Ok(Self { db })