[refactor](trx-client): use trx-app for shared infrastructure

Replace client's local implementations with unified trx-app utilities.

Changes:
- Use trx_app::normalize_name() instead of local fn
- Depend on trx-app crate

This eliminates the client's copy of the normalize_name logic and ensures
both server and client use the same implementation.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-12 20:39:22 +01:00
parent 5d83fba8f5
commit 1a2ae96b6a
2 changed files with 2 additions and 8 deletions
+1
View File
@@ -18,6 +18,7 @@ clap = { workspace = true, features = ["derive"] }
dirs = "6" dirs = "6"
libloading = "0.8" libloading = "0.8"
bytes = "1" bytes = "1"
trx-app = { path = "../trx-app" }
trx-core = { path = "../trx-core" } trx-core = { path = "../trx-core" }
trx-protocol = { path = "../trx-protocol" } trx-protocol = { path = "../trx-protocol" }
trx-frontend = { path = "trx-frontend" } trx-frontend = { path = "trx-frontend" }
+1 -8
View File
@@ -17,6 +17,7 @@ use tokio::signal;
use tokio::sync::{broadcast, mpsc, watch}; use tokio::sync::{broadcast, mpsc, watch};
use tracing::info; use tracing::info;
use trx_app::normalize_name;
use trx_core::audio::AudioStreamInfo; use trx_core::audio::AudioStreamInfo;
use trx_core::rig::request::RigRequest; use trx_core::rig::request::RigRequest;
@@ -81,14 +82,6 @@ struct Cli {
callsign: Option<String>, callsign: Option<String>,
} }
/// Normalize a rig/frontend name to lowercase alphanumeric.
fn normalize_name(name: &str) -> String {
name.to_ascii_lowercase()
.chars()
.filter(|c| c.is_ascii_alphanumeric())
.collect()
}
fn main() -> DynResult<()> { fn main() -> DynResult<()> {
let rt = tokio::runtime::Runtime::new()?; let rt = tokio::runtime::Runtime::new()?;