From d8f030667f6c1928a6ab10ecb60306538400b310 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sat, 28 Feb 2026 08:13:00 +0100 Subject: [PATCH] [chore](trx-rs): remove unused example_toml() methods Superseded by example_combined_toml() which now covers all use cases. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Stan Grams --- src/trx-client/src/config.rs | 43 ------------------------------------ src/trx-server/src/config.rs | 35 ----------------------------- 2 files changed, 78 deletions(-) diff --git a/src/trx-client/src/config.rs b/src/trx-client/src/config.rs index a654aaf..e9d588b 100644 --- a/src/trx-client/src/config.rs +++ b/src/trx-client/src/config.rs @@ -369,49 +369,6 @@ impl ClientConfig { ::load_from_default_paths() } - /// Generate an example configuration as a TOML string. - pub fn example_toml() -> String { - let example = ClientConfig { - general: GeneralConfig { - callsign: Some("N0CALL".to_string()), - log_level: Some("info".to_string()), - }, - remote: RemoteConfig { - url: Some("192.168.1.100:9000".to_string()), - rig_id: Some("hf".to_string()), - auth: RemoteAuthConfig { - token: Some("my-token".to_string()), - }, - poll_interval_ms: 750, - }, - frontends: FrontendsConfig { - http: HttpFrontendConfig { - enabled: true, - listen: IpAddr::from([127, 0, 0, 1]), - port: 8080, - auth: HttpAuthConfig { - enabled: false, - rx_passphrase: Some("rx-passphrase-example".to_string()), - control_passphrase: Some("control-passphrase-example".to_string()), - tx_access_control_enabled: true, - session_ttl_min: 480, - cookie_secure: false, - cookie_same_site: CookieSameSite::Lax, - }, - }, - rigctl: RigctlFrontendConfig { - enabled: false, - listen: IpAddr::from([127, 0, 0, 1]), - port: 4532, - }, - http_json: HttpJsonFrontendConfig::default(), - audio: AudioClientConfig::default(), - }, - }; - - toml::to_string_pretty(&example).unwrap_or_default() - } - /// Generate an example configuration wrapped under the `[trx-client]` /// section header, suitable for use in a combined `trx-rs.toml` file. pub fn example_combined_toml() -> String { diff --git a/src/trx-server/src/config.rs b/src/trx-server/src/config.rs index add5c78..139cef1 100644 --- a/src/trx-server/src/config.rs +++ b/src/trx-server/src/config.rs @@ -657,41 +657,6 @@ impl ServerConfig { }] } - /// Generate an example configuration as a TOML string. - pub fn example_toml() -> String { - let example = ServerConfig { - general: GeneralConfig { - callsign: Some("N0CALL".to_string()), - log_level: Some("info".to_string()), - latitude: Some(52.2297), - longitude: Some(21.0122), - }, - rig: RigConfig { - model: Some("ft817".to_string()), - initial_freq_hz: 144_300_000, - initial_mode: RigMode::USB, - access: AccessConfig { - access_type: Some("serial".to_string()), - port: Some("/dev/ttyUSB0".to_string()), - baud: Some(9600), - host: None, - tcp_port: None, - args: None, - }, - }, - behavior: BehaviorConfig::default(), - listen: ListenConfig::default(), - audio: AudioConfig::default(), - pskreporter: PskReporterConfig::default(), - aprsfi: AprsFiConfig::default(), - decode_logs: DecodeLogsConfig::default(), - sdr: SdrConfig::default(), - rigs: Vec::new(), - }; - - toml::to_string_pretty(&example).unwrap_or_default() - } - /// Generate an example configuration wrapped under the `[trx-server]` /// section header, suitable for use in a combined `trx-rs.toml` file. pub fn example_combined_toml() -> String {