Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Mar 1, 2024
1 parent 3bdfb08 commit a55a449
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bin/hms-mqtt-publish/rumqttc_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ impl mqtt_wrapper::MqttWrapper for RumqttcWrapper {
if use_tls {
// Use rustls-native-certs to load root certificates from the operating system.
let mut roots = tokio_rustls::rustls::RootCertStore::empty();
rustls_native_certs::load_native_certs().expect("could not load platform certs").into_iter().for_each(|cert| {
roots.add(cert).unwrap();
});
rustls_native_certs::load_native_certs()
.expect("could not load platform certs")
.into_iter()
.for_each(|cert| {
roots.add(cert).unwrap();
});

let client_config = ClientConfig::builder()
.with_root_certificates(roots)
Expand Down

0 comments on commit a55a449

Please sign in to comment.