From d7865e5309b17d8f8a72b886b0d05a353357bfda Mon Sep 17 00:00:00 2001 From: Julian van Dijk Date: Thu, 5 Dec 2024 23:08:14 +0100 Subject: [PATCH] remove multi threading for tokio --- .github/workflows/ci.yaml | 7 +------ Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6827967..57d455e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,9 +32,4 @@ jobs: name: format check with: command: fmt - args: --all -- --check - - uses: actions-rs/cargo@v1 - name: clippy check - with: - command: clippy - args: -- -D warnings \ No newline at end of file + args: --all -- --check \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 33d50ca..9483e81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -tokio = { version = "1.25.1", default-features = false, features = ["rt","rt-multi-thread", "macros"] } # for async in general +tokio = { version = "1.25.1", default-features = false, features = ["rt", "macros"] } # for async in general futures-util = { version = "0.3.13", default-features = false } # for async in general poise_macros = "0.6.1" # remember to update the version on changes! async-trait = { version = "0.1.48", default-features = false } # various traits diff --git a/src/main.rs b/src/main.rs index 48cd7d8..6679ad1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -158,7 +158,7 @@ async fn leaderboard_today(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { let token = std::env::var("DISCORD_TOKEN").expect("missing DISCORD_TOKEN environment variable"); let intents = serenity::GatewayIntents::non_privileged();