[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:
@@ -18,6 +18,7 @@ clap = { workspace = true, features = ["derive"] }
|
||||
dirs = "6"
|
||||
libloading = "0.8"
|
||||
bytes = "1"
|
||||
trx-app = { path = "../trx-app" }
|
||||
trx-core = { path = "../trx-core" }
|
||||
trx-protocol = { path = "../trx-protocol" }
|
||||
trx-frontend = { path = "trx-frontend" }
|
||||
|
||||
@@ -17,6 +17,7 @@ use tokio::signal;
|
||||
use tokio::sync::{broadcast, mpsc, watch};
|
||||
use tracing::info;
|
||||
|
||||
use trx_app::normalize_name;
|
||||
use trx_core::audio::AudioStreamInfo;
|
||||
|
||||
use trx_core::rig::request::RigRequest;
|
||||
@@ -81,14 +82,6 @@ struct Cli {
|
||||
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<()> {
|
||||
let rt = tokio::runtime::Runtime::new()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user