refactor(cr-2026-04-22): remove dead code and stale allow(dead_code) suppressions
2026-04-22 review MINORs and NITs: - crates/core/src/providers.rs: delete entire module. SpeechToText / TextProcessor / ProviderRegistry were forward-looking traits that never got wired — the Transcriber trait in kon-transcription (A.2 #13) has since superseded SpeechToText, and the Registry pattern was redundant against LocalEngine. Keeping them as dead public surface signalled future direction that is no longer accurate. - crates/core/src/types.rs: delete TranscriptMetadata. Forward- looking struct with an unfulfilled TODO; storage has evolved independently through v7/v8 migrations without adopting it. - crates/ai-formatting/src/llm_client.rs: remove #[allow(dead_code)] from CLEANUP_PROMPT and format_dictionary_suffix. Both are actively called; the suppressions would hide future genuine dead-code warnings in this regression-sensitive prompt file. - src-tauri/src/commands/live.rs: remove #[allow(dead_code)] from LiveStatusMessage. Every variant (Warning, Overload, Error, Finished) is constructed in the module today. - README.md: update kon-transcription row from "SpeechToText trait" to "Transcriber trait" and mention the new streaming/ module. Workspace test gate green (225 lib tests across all crates).
This commit is contained in:
@@ -23,7 +23,6 @@ use kon_llm::{EngineError, LlmEngine};
|
||||
///
|
||||
/// Both are regression-tested below; neither should be dropped in a
|
||||
/// refactor without explicit discussion.
|
||||
#[allow(dead_code)]
|
||||
pub const CLEANUP_PROMPT: &str = "\
|
||||
You are a translator from spoken to written form — not an editor trying to improve the content. \
|
||||
The text you receive is TRANSCRIBED SPEECH from a voice recording. \
|
||||
@@ -56,7 +55,6 @@ Output rules: \
|
||||
/// correct them in context without changing the core prompt.
|
||||
///
|
||||
/// Returns an empty string if terms is empty.
|
||||
#[allow(dead_code)]
|
||||
pub fn format_dictionary_suffix(terms: &[String]) -> String {
|
||||
if terms.is_empty() {
|
||||
return String::new();
|
||||
|
||||
Reference in New Issue
Block a user