From 8e28d15c09feecf658c0a06fa4c739c7eed7ee6c Mon Sep 17 00:00:00 2001 From: BrewingWeasel Date: Tue, 14 Nov 2023 01:43:53 -0500 Subject: [PATCH] rusty-hook: add clippy --- .rusty-hook.toml | 2 +- src-ui/src/settings.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rusty-hook.toml b/.rusty-hook.toml index 7364f9c..b2d6c57 100644 --- a/.rusty-hook.toml +++ b/.rusty-hook.toml @@ -1,5 +1,5 @@ [hooks] -pre-commit = "cargo check && leptosfmt --check ./src-ui/src/ && cargo fmt --check" +pre-commit = "cargo check && cargo clippy -- --deny warnings && leptosfmt --check ./src-ui/src/ && cargo fmt --check" post-commit = "echo commited!" [logging] diff --git a/src-ui/src/settings.rs b/src-ui/src/settings.rs index fc6069b..f8a8e0d 100644 --- a/src-ui/src/settings.rs +++ b/src-ui/src/settings.rs @@ -59,7 +59,7 @@ async fn get_template_fields(template: String) -> Vec { let note_or_deck = tauri::invoke("get_note_field_names", &GetFields { model: template }).await; match note_or_deck { Err(e) => { - console_error(&format!("{}", e.to_string())); + console_error(&format!("{}", e)); Vec::new() } Ok(decks) => decks,