style: fix cargo fmt violations in config module
The TTS providers merge (#2994) introduced import ordering and line-wrapping that doesn't match rustfmt output, causing lint failures on all open PRs targeting master.
This commit is contained in:
parent
f2035819c2
commit
69abd217d7
@ -7,17 +7,17 @@ pub use schema::{
|
||||
build_runtime_proxy_client_with_timeouts, runtime_proxy_config, set_runtime_proxy_config,
|
||||
AgentConfig, AuditConfig, AutonomyConfig, BrowserComputerUseConfig, BrowserConfig,
|
||||
BuiltinHooksConfig, ChannelsConfig, ClassificationRule, ComposioConfig, Config, CostConfig,
|
||||
CronConfig, DelegateAgentConfig, DiscordConfig, DockerRuntimeConfig, EmbeddingRouteConfig,
|
||||
EstopConfig, FeishuConfig, GatewayConfig, HardwareConfig, HardwareTransport, HeartbeatConfig,
|
||||
HooksConfig, HttpRequestConfig, IMessageConfig, IdentityConfig, LarkConfig, MatrixConfig,
|
||||
MemoryConfig, ModelRouteConfig, MultimodalConfig, NextcloudTalkConfig, ObservabilityConfig,
|
||||
CronConfig, DelegateAgentConfig, DiscordConfig, DockerRuntimeConfig, EdgeTtsConfig,
|
||||
ElevenLabsTtsConfig, EmbeddingRouteConfig, EstopConfig, FeishuConfig, GatewayConfig,
|
||||
GoogleTtsConfig, HardwareConfig, HardwareTransport, HeartbeatConfig, HooksConfig,
|
||||
HttpRequestConfig, IMessageConfig, IdentityConfig, LarkConfig, MatrixConfig, MemoryConfig,
|
||||
ModelRouteConfig, MultimodalConfig, NextcloudTalkConfig, ObservabilityConfig, OpenAiTtsConfig,
|
||||
OtpConfig, OtpMethod, PeripheralBoardConfig, PeripheralsConfig, ProxyConfig, ProxyScope,
|
||||
QdrantConfig, QueryClassificationConfig, ReliabilityConfig, ResourceLimitsConfig,
|
||||
RuntimeConfig, SandboxBackend, SandboxConfig, SchedulerConfig, SecretsConfig, SecurityConfig,
|
||||
SkillsConfig, SkillsPromptInjectionMode, SlackConfig, StorageConfig, StorageProviderConfig,
|
||||
StorageProviderSection, StreamMode, TelegramConfig, TranscriptionConfig, TtsConfig,
|
||||
EdgeTtsConfig, ElevenLabsTtsConfig, GoogleTtsConfig, OpenAiTtsConfig, TunnelConfig,
|
||||
WebFetchConfig, WebSearchConfig, WebhookConfig,
|
||||
TunnelConfig, WebFetchConfig, WebSearchConfig, WebhookConfig,
|
||||
};
|
||||
|
||||
pub fn name_and_presence<T: traits::ChannelConfig>(channel: Option<&T>) -> (&'static str, bool) {
|
||||
|
||||
@ -4263,11 +4263,7 @@ impl Config {
|
||||
|
||||
// Decrypt TTS provider API keys
|
||||
if let Some(ref mut openai) = config.tts.openai {
|
||||
decrypt_optional_secret(
|
||||
&store,
|
||||
&mut openai.api_key,
|
||||
"config.tts.openai.api_key",
|
||||
)?;
|
||||
decrypt_optional_secret(&store, &mut openai.api_key, "config.tts.openai.api_key")?;
|
||||
}
|
||||
if let Some(ref mut elevenlabs) = config.tts.elevenlabs {
|
||||
decrypt_optional_secret(
|
||||
@ -4277,11 +4273,7 @@ impl Config {
|
||||
)?;
|
||||
}
|
||||
if let Some(ref mut google) = config.tts.google {
|
||||
decrypt_optional_secret(
|
||||
&store,
|
||||
&mut google.api_key,
|
||||
"config.tts.google.api_key",
|
||||
)?;
|
||||
decrypt_optional_secret(&store, &mut google.api_key, "config.tts.google.api_key")?;
|
||||
}
|
||||
|
||||
if let Some(ref mut ns) = config.channels_config.nostr {
|
||||
@ -4921,11 +4913,7 @@ impl Config {
|
||||
|
||||
// Encrypt TTS provider API keys
|
||||
if let Some(ref mut openai) = config_to_save.tts.openai {
|
||||
encrypt_optional_secret(
|
||||
&store,
|
||||
&mut openai.api_key,
|
||||
"config.tts.openai.api_key",
|
||||
)?;
|
||||
encrypt_optional_secret(&store, &mut openai.api_key, "config.tts.openai.api_key")?;
|
||||
}
|
||||
if let Some(ref mut elevenlabs) = config_to_save.tts.elevenlabs {
|
||||
encrypt_optional_secret(
|
||||
@ -4935,11 +4923,7 @@ impl Config {
|
||||
)?;
|
||||
}
|
||||
if let Some(ref mut google) = config_to_save.tts.google {
|
||||
encrypt_optional_secret(
|
||||
&store,
|
||||
&mut google.api_key,
|
||||
"config.tts.google.api_key",
|
||||
)?;
|
||||
encrypt_optional_secret(&store, &mut google.api_key, "config.tts.google.api_key")?;
|
||||
}
|
||||
|
||||
if let Some(ref mut ns) = config_to_save.channels_config.nostr {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user