Browse Source
Fix formating and pre-commit
Signed-off-by: BlackDex <black.dex@gmail.com>
pull/6339/head
BlackDex
1 month ago
No known key found for this signature in database
GPG Key ID: 58C80A2AA6C765E1
2 changed files with
4 additions and
2 deletions
-
.pre-commit-config.yaml
-
src/api/admin.rs
|
|
@ -22,7 +22,8 @@ repos: |
|
|
description: Format files with cargo fmt. |
|
|
description: Format files with cargo fmt. |
|
|
entry: cargo fmt |
|
|
entry: cargo fmt |
|
|
language: system |
|
|
language: system |
|
|
types: [rust] |
|
|
always_run: true |
|
|
|
|
|
pass_filenames: false |
|
|
args: ["--", "--check"] |
|
|
args: ["--", "--check"] |
|
|
- id: cargo-test |
|
|
- id: cargo-test |
|
|
name: cargo test |
|
|
name: cargo test |
|
|
|
|
|
@ -92,7 +92,8 @@ static DB_TYPE: LazyLock<&str> = LazyLock::new(|| match ACTIVE_DB_TYPE.get() { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
#[cfg(sqlite)] |
|
|
#[cfg(sqlite)] |
|
|
static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| ACTIVE_DB_TYPE.get().map(|t| *t == DbConnType::Sqlite).unwrap_or(false)); |
|
|
static CAN_BACKUP: LazyLock<bool> = |
|
|
|
|
|
LazyLock::new(|| ACTIVE_DB_TYPE.get().map(|t| *t == DbConnType::Sqlite).unwrap_or(false)); |
|
|
#[cfg(not(sqlite))] |
|
|
#[cfg(not(sqlite))] |
|
|
static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| false); |
|
|
static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| false); |
|
|
|
|
|
|
|
|
|