From f28ed7b758b6cf05b6be7cb3932e6ce9e64973a9 Mon Sep 17 00:00:00 2001 From: Austin Schaefer Date: Fri, 21 Aug 2026 15:41:16 +0200 Subject: [PATCH] Fix CI: cargo fmt and clippy -D warnings failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cargo fmt: reformat a match arm in app.rs and drop trailing blank lines the dx-components generator left in two mod.rs files - clippy -D warnings (feedsignal-web, server feature): the generated ButtonVariant/ButtonSize enums have variants this app doesn't use yet (they're part of the component library's API surface, not dead code in the ordinary sense) — clippy's dead_code lint was failing the build under -D warnings, fixed with a scoped #[allow(dead_code)] Verified all three CI jobs locally: cargo fmt --check, clippy for native crates + both feedsignal-web feature sets, cargo test --workspace --exclude feedsignal-web, and cargo audit. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01XJJQb2DWZZwQ1yPiaAQQoY --- crates/web/src/app.rs | 4 +++- crates/web/src/components/button/component.rs | 6 ++++++ crates/web/src/components/button/mod.rs | 2 +- crates/web/src/components/input/mod.rs | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/web/src/app.rs b/crates/web/src/app.rs index 8f0115d..c85dc03 100644 --- a/crates/web/src/app.rs +++ b/crates/web/src/app.rs @@ -60,7 +60,9 @@ fn SubscribeForm(on_subscribed: EventHandler<()>) -> Element { status.set(None); match subscribe_feed(feed_url).await { Ok(count) => { - status.set(Some(Ok(format!("Subscribed — pulled in {count} article(s).")))); + status.set(Some(Ok(format!( + "Subscribed — pulled in {count} article(s)." + )))); url.set(String::new()); on_subscribed.call(()); } diff --git a/crates/web/src/components/button/component.rs b/crates/web/src/components/button/component.rs index bbf3b9c..5d4a423 100644 --- a/crates/web/src/components/button/component.rs +++ b/crates/web/src/components/button/component.rs @@ -5,6 +5,11 @@ use dioxus_primitives::merge_attributes; #[css_module("/src/components/button/style.css")] struct Styles; +// Variants beyond the ones this app currently uses are part of the +// component library's public API, not unused code — CI runs clippy with +// `-D warnings`, which would otherwise turn this dead_code lint into a +// build failure. +#[allow(dead_code)] #[derive(Copy, Clone, PartialEq, Default)] #[non_exhaustive] pub enum ButtonVariant { @@ -30,6 +35,7 @@ impl ButtonVariant { } } +#[allow(dead_code)] #[derive(Copy, Clone, PartialEq, Default)] #[non_exhaustive] pub enum ButtonSize { diff --git a/crates/web/src/components/button/mod.rs b/crates/web/src/components/button/mod.rs index 9a8ae55..2590c01 100644 --- a/crates/web/src/components/button/mod.rs +++ b/crates/web/src/components/button/mod.rs @@ -1,2 +1,2 @@ mod component; -pub use component::*; \ No newline at end of file +pub use component::*; diff --git a/crates/web/src/components/input/mod.rs b/crates/web/src/components/input/mod.rs index 9a8ae55..2590c01 100644 --- a/crates/web/src/components/input/mod.rs +++ b/crates/web/src/components/input/mod.rs @@ -1,2 +1,2 @@ mod component; -pub use component::*; \ No newline at end of file +pub use component::*;