From 7454da652585b08d9e5303b699bd24396580ace0 Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 3 May 2024 04:12:15 +0200 Subject: [PATCH] chore: cleanup --- src/main.rs | 12 +++++------- src/server/dispatcher.rs | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9f80fe68..5ed9baf3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,9 @@ -pub mod server; -pub mod model; -pub mod routes; -pub mod cli; +mod server; +mod model; +mod routes; +mod cli; -pub mod errors; +mod errors; #[cfg(feature = "migrations")] mod migrations; @@ -48,7 +48,6 @@ enum CliCommand { /// apply database migrations Migrate, - #[cfg(feature = "faker")] /// generate fake user, note and activity Faker{ /// how many fake statuses to insert for root user @@ -123,7 +122,6 @@ async fn main() { migrations::Migrator::up(&db, None) .await.expect("error applying migrations"), - #[cfg(feature = "faker")] CliCommand::Faker { count } => cli::faker(&db, args.domain, count) .await.expect("error creating fake entities"), diff --git a/src/server/dispatcher.rs b/src/server/dispatcher.rs index c595f1d8..93b6cd94 100644 --- a/src/server/dispatcher.rs +++ b/src/server/dispatcher.rs @@ -17,8 +17,6 @@ impl Default for Dispatcher { } impl Dispatcher { - pub fn new() -> Self { Dispatcher::default() } - pub fn spawn(&self, db: DatabaseConnection, domain: String, poll_interval: u64) -> JoinHandle<()> { let waker = self.waker.subscribe(); tokio::spawn(async move {