diff --git a/exes/mqtt-bridge/inc/client.hpp b/exes/mqtt-bridge/inc/client.hpp index 49dceb1400..608e67469a 100644 --- a/exes/mqtt-bridge/inc/client.hpp +++ b/exes/mqtt-bridge/inc/client.hpp @@ -115,9 +115,9 @@ class client { p_id = endpoint_client_->acquire_unique_packet_id(); - auto sub_packet = async_mqtt::v5::subscribe_packet{ - p_id.value(), { { topic, async_mqtt::qos::at_most_once | async_mqtt::sub::nl::yes } } - }; + auto sub_packet = + async_mqtt::v5::subscribe_packet{ p_id.value(), + { { topic, async_mqtt::qos::at_most_once | async_mqtt::sub::nl::yes } } }; auto send_error = co_await endpoint_client_->send(sub_packet, asio::use_awaitable); @@ -192,23 +192,22 @@ class client { auto connect_packet() -> async_mqtt::v5::connect_packet { if (config_.value().username.empty() || config_.value().password.empty()) { - return async_mqtt::v5::connect_packet{ true, - std::chrono::seconds(100).count(), - config_.value().client_id, - async_mqtt::will( - mqtt_will_topic_, - async_mqtt::buffer(std::string_view{ mqtt_will_payload_ }), - { async_mqtt::qos::at_least_once | async_mqtt::pub::retain::no }), - std::nullopt, - std::nullopt, - { async_mqtt::property::session_expiry_interval{ 0 } } }; + return async_mqtt::v5::connect_packet{ + true, + std::chrono::seconds(100).count(), + config_.value().client_id, + async_mqtt::will(mqtt_will_topic_, async_mqtt::buffer(std::string_view{ mqtt_will_payload_ }), + { async_mqtt::qos::at_least_once | async_mqtt::pub::retain::no }), + std::nullopt, + std::nullopt, + { async_mqtt::property::session_expiry_interval{ 0 } } + }; } return async_mqtt::v5::connect_packet{ true, std::chrono::seconds(100).count(), config_.value().client_id, async_mqtt::will( - mqtt_will_topic_, - async_mqtt::buffer(std::string_view{ mqtt_will_payload_ }), + mqtt_will_topic_, async_mqtt::buffer(std::string_view{ mqtt_will_payload_ }), { async_mqtt::qos::at_least_once | async_mqtt::pub::retain::no }), config_.value().username, config_.value().password, diff --git a/libs/confman/inc/public/tfc/confman.hpp b/libs/confman/inc/public/tfc/confman.hpp index 964c7e4a99..86cc04488e 100644 --- a/libs/confman/inc/public/tfc/confman.hpp +++ b/libs/confman/inc/public/tfc/confman.hpp @@ -79,7 +79,9 @@ class config { auto operator->() const noexcept -> storage_t const* { return std::addressof(value()); } /// \return storage_t as json string - [[nodiscard]] auto string() const -> std::expected { return glz::write_json(storage_.value()); } + [[nodiscard]] auto string() const -> std::expected { + return glz::write_json(storage_.value()); + } /// TODO can we do this differently, jsonforms requires object as root element /// an example of failure would be confman> as the json schema root element would be array