diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bdda09..efff0cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ set(dependencies cpputils espchrono espcpputils - fmt ) idf_component_register( diff --git a/src/esphttpdutils.cpp b/src/esphttpdutils.cpp index f8e82b2..d3d1f97 100644 --- a/src/esphttpdutils.cpp +++ b/src/esphttpdutils.cpp @@ -2,14 +2,12 @@ // system includes #include +#include // esp-idf includes #include #include -// 3rdparty lib includes -#include - // 3rdparty lib includes #include "espcppmacros.h" @@ -62,7 +60,7 @@ std::expected urlverify(std::string_view str) http_parser_url puri; http_parser_url_init(&puri); if (const auto result = http_parser_parse_url(str.data(), str.size(), 0, &puri); result != 0) - return std::unexpected(fmt::format("http_parser_parse_url() failed with {}", result)); + return std::unexpected(std::format("http_parser_parse_url() failed with {}", result)); return {}; } @@ -91,7 +89,7 @@ std::expected webserver_get_query(httpd_req_t *req) { query.resize(queryLength); if (const auto result = httpd_req_get_url_query_str(req, query.data(), query.size() + 1); result != ESP_OK) - return std::unexpected(fmt::format("httpd_req_get_url_query_str() failed with {}", esp_err_to_name(result))); + return std::unexpected(std::format("httpd_req_get_url_query_str() failed with {}", esp_err_to_name(result))); } return query; @@ -109,7 +107,7 @@ std::string toString(httpd_ws_type_t val) case HTTPD_WS_TYPE_PONG: return "HTTPD_WS_TYPE_PONG"; break; } ESP_LOGW(TAG, "Unknown httpd_ws_type_t(%i)", std::to_underlying(val)); - return fmt::format("Unknown httpd_ws_type_t({})", std::to_underlying(val)); + return std::format("Unknown httpd_ws_type_t({})", std::to_underlying(val)); } } // namespace esphttpdutils