From 7d47be4c40ac8f9a9c33ae8c78e44d20c2c46ef6 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 03:09:00 -0400 Subject: windows: windows_util -> util::windows --- src/bot.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/bot.rs') diff --git a/src/bot.rs b/src/bot.rs index de31c73..0c44349 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -258,11 +258,11 @@ fn on_err(err: FrameworkError) -> BoxFuture<()> { } else { return; } - }, + } Err(e) => { error!("processing unrecognized message: {e}"); "BANIC".to_string() - }, + } } } else { if let Err(e) = commands::meme::invoke::_meme( @@ -270,7 +270,7 @@ fn on_err(err: FrameworkError) -> BoxFuture<()> { msg_content, Default::default(), ) - .await + .await { error!("producing meme for unrecognized: {e}"); "BANIC".to_string() @@ -278,7 +278,7 @@ fn on_err(err: FrameworkError) -> BoxFuture<()> { return; } } - }, + } _ => "BANIC".to_string(), }; @@ -377,7 +377,7 @@ fn check(ctx: PoiseContext) -> BoxFuture> { }) } -fn before_handle<'fut>(ctx: PoiseContext<'fut>) -> Pin + Send + 'fut>> { +fn before_handle<'fut>(ctx: PoiseContext<'fut>) -> Pin + Send + 'fut>> { debug!( "got command '{}' from user '{}' ({})", ctx.command().name, @@ -397,7 +397,7 @@ fn after_handle(ctx: PoiseContext) -> BoxFuture<()> { pub async fn run() -> anyhow::Result<()> { #[cfg(all(windows, feature = "windows_autostart_postgres"))] let started_pg = - tokio::task::spawn_blocking(|| unsafe { crate::windows_util::ensure_postgres_started() }) + tokio::task::spawn_blocking(|| unsafe { util::windows::ensure_postgres_started() }) .await??; let token = &CONFIG.discord.auth.token; @@ -431,7 +431,7 @@ pub async fn run() -> anyhow::Result<()> { if started_pg { log::info!("we started postgres, stopping it before shutdown"); - tokio::task::spawn_blocking(|| crate::windows_util::shutdown_postgres()).await??; + tokio::task::spawn_blocking(|| util::windows::shutdown_postgres()).await??; } } -- cgit v1.3.1