Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarrara committed Dec 1, 2024
1 parent f699f00 commit ea03894
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions crates/arroyo-connectors/src/rabbitmq_stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use arroyo_rpc::{api_types::connections::TestSourceMessage, OperatorConfig};
use rabbitmq_stream_client::types::OffsetSpecification;
use rabbitmq_stream_client::{Environment, TlsConfiguration};
use serde::{Deserialize, Serialize};
use tracing::{info, warn};
use typify::import_types;

use crate::rabbitmq_stream::source::RabbitmqStreamSourceFunc;
Expand Down Expand Up @@ -262,15 +261,15 @@ impl SourceOffset {
}
}

impl Into<TlsConfiguration> for TlsConfig {
fn into(self) -> TlsConfiguration {
impl From<TlsConfig> for TlsConfiguration {
fn from(val: TlsConfig) -> Self {
let mut config = TlsConfiguration::default();
config.enable(self.enabled.unwrap_or(false));
config.trust_certificates(self.trust_certificates.unwrap_or(false));
config.add_root_certificates_path(self.root_certificates_path.unwrap_or(String::from("")));
config.enable(val.enabled.unwrap_or(false));
config.trust_certificates(val.trust_certificates.unwrap_or(false));
config.add_root_certificates_path(val.root_certificates_path.unwrap_or(String::from("")));
config.add_client_certificates_keys(
self.client_certificates_path.unwrap_or(String::from("")),
self.client_keys_path.unwrap_or(String::from("")),
val.client_certificates_path.unwrap_or(String::from("")),
val.client_keys_path.clone().unwrap_or(String::from("")),
);
config
}
Expand Down

0 comments on commit ea03894

Please sign in to comment.