From 4a3e81e7e7303274fd3373c056fdbb927089ba45 Mon Sep 17 00:00:00 2001 From: AH-dark Date: Fri, 27 Dec 2024 16:47:29 +0800 Subject: [PATCH] ci: add format step --- .github/workflows/rust.yml | 5 ++++- src/cron.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a6ea9c3..7b0daf7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3 - + - name: Set up cargo cache uses: actions/cache@v3 continue-on-error: false @@ -33,6 +33,9 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- + - name: Format + run: cargo fmt --all -- --check + - name: Build run: cargo build --verbose --features full diff --git a/src/cron.rs b/src/cron.rs index 7ee0c16..68ad971 100644 --- a/src/cron.rs +++ b/src/cron.rs @@ -23,7 +23,7 @@ pub enum Error { } /// Run the scheduler in a separate task, return a Future -async fn run_scheduler<'a>(job_scheduler: Arc>>) { +async fn run_scheduler(job_scheduler: Arc>>) { let mut interval = tokio::time::interval(tokio::time::Duration::from_secs(1)); loop {