From db24be3b1254c6ac30e0b1096967fe230ccd4441 Mon Sep 17 00:00:00 2001 From: Sagar Tamang Date: Mon, 24 Aug 2026 16:55:53 +0530 Subject: [PATCH] fix: unused TextModelArch import when luxtts feature is disabled `TextModelArch` is imported unconditionally in cake-cli/src/main.rs, but its only use site is inside a `#[cfg(feature = "luxtts")]` block in `run_master`. Building the CLI without that feature produces: warning: unused import: `TextModelArch` --> cake-cli/src/main.rs:10:45 Reproduce with: cargo build --release -p cake-cli --no-default-features \ --features "master,llama,qwen2,qwen3" This goes unnoticed because `luxtts` is in the default feature set, and the Android CI job builds cake-core with reduced features but only ever builds cake-mobile -- never cake-cli. It breaks the zero-warning clippy requirement in CLAUDE.md for any reduced-feature build. Fixed by dropping the import and fully qualifying the path at the use site, matching the adjacent `cake_core::dispatch_text_model!` call. This keeps the fix valid under every feature combination without adding a second `#[cfg]` attribute that has to stay in sync with the first. Co-Authored-By: Claude Opus 5 --- cake-cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake-cli/src/main.rs b/cake-cli/src/main.rs index 96f5996..4c789a8 100644 --- a/cake-cli/src/main.rs +++ b/cake-cli/src/main.rs @@ -7,7 +7,7 @@ mod chat; use cake_core::{ cake::{self, Context, Mode, Worker}, - utils, Args, ImageModelArch, ModelType, TextModelArch, + utils, Args, ImageModelArch, ModelType, }; use anyhow::Result; @@ -318,7 +318,7 @@ pub(crate) async fn run_master(ctx: Context) -> Result<()> { // LuxTTS: TTS model using TextModel dispatch for sharding #[cfg(feature = "luxtts")] - if ctx.text_model_arch == TextModelArch::LuxTTS { + if ctx.text_model_arch == cake_core::TextModelArch::LuxTTS { return run_master_luxtts(ctx).await; }