From 3393aef474631485eecfefffc395dd3cd0c07deb Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 21 Mar 2024 19:59:06 +0800 Subject: [PATCH] trivial typo fixes --- include/boost/redis/connection.hpp | 8 ++++---- include/boost/redis/detail/connection_base.hpp | 2 +- include/boost/redis/error.hpp | 2 +- include/boost/redis/impl/error.ipp | 2 +- include/boost/redis/resp3/impl/parser.ipp | 2 +- test/test_low_level.cpp | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/redis/connection.hpp b/include/boost/redis/connection.hpp index 71348f33..8462d547 100644 --- a/include/boost/redis/connection.hpp +++ b/include/boost/redis/connection.hpp @@ -102,7 +102,7 @@ class basic_connection { , timer_{ex} { } - /// Contructs from a context. + /// Constructs from a context. explicit basic_connection( asio::io_context& ioc, @@ -125,17 +125,17 @@ class basic_connection { * timeout with value zero will disable health-checks. If the Redis * server does not respond to a health-check within two times the value * specified here, it will be considered unresponsive and the connection - * will be closed and a new connection will be stablished. + * will be closed and a new connection will be established. * 5. Starts read and write operations with the Redis * server. More specifically it will trigger the write of all * requests i.e. calls to `async_exec` that happened prior to this * call. * * When a connection is lost for any reason, a new one is - * stablished automatically. To disable reconnection call + * established automatically. To disable reconnection call * `boost::redis::connection::cancel(operation::reconnection)`. * - * @param cfg Configuration paramters. + * @param cfg Configuration parameters. * @param l Logger object. The interface expected is specified in the class `boost::redis::logger`. * @param token Completion token. * diff --git a/include/boost/redis/detail/connection_base.hpp b/include/boost/redis/detail/connection_base.hpp index 69ae68ca..45da3391 100644 --- a/include/boost/redis/detail/connection_base.hpp +++ b/include/boost/redis/detail/connection_base.hpp @@ -265,7 +265,7 @@ struct writer_op { conn_->writer_timer_.async_wait(std::move(self)); if (!conn_->is_open() || is_cancelled(self)) { logger_.trace("writer-op: canceled (3). Exiting ..."); - // Notice this is not an error of the op, stoping was + // Notice this is not an error of the op, stopping was // requested from the outside, so we complete with // success. self.complete({}); diff --git a/include/boost/redis/error.hpp b/include/boost/redis/error.hpp index 0519b7fb..dc174829 100644 --- a/include/boost/redis/error.hpp +++ b/include/boost/redis/error.hpp @@ -23,7 +23,7 @@ enum class error not_a_number, /// The maximum depth of a nested response was exceeded. - exceeeds_max_nested_depth, + exceeds_max_nested_depth, /// Got non boolean value. unexpected_bool_value, diff --git a/include/boost/redis/impl/error.ipp b/include/boost/redis/impl/error.ipp index f7b7fa2b..c2882577 100644 --- a/include/boost/redis/impl/error.ipp +++ b/include/boost/redis/impl/error.ipp @@ -24,7 +24,7 @@ struct error_category_impl : system::error_category { switch(static_cast(ev)) { case error::invalid_data_type: return "Invalid resp3 type."; case error::not_a_number: return "Can't convert string to number (maybe forgot to upgrade to RESP3?)."; - case error::exceeeds_max_nested_depth: return "Exceeds the maximum number of nested responses."; + case error::exceeds_max_nested_depth: return "Exceeds the maximum number of nested responses."; case error::unexpected_bool_value: return "Unexpected bool value."; case error::empty_field: return "Expected field value is empty."; case error::expects_resp3_simple_type: return "Expects a resp3 simple type."; diff --git a/include/boost/redis/resp3/impl/parser.ipp b/include/boost/redis/resp3/impl/parser.ipp index eda9991d..668d7f14 100644 --- a/include/boost/redis/resp3/impl/parser.ipp +++ b/include/boost/redis/resp3/impl/parser.ipp @@ -199,7 +199,7 @@ parser::consume_impl( commit_elem(); } else { if (depth_ == max_embedded_depth) { - ec = error::exceeeds_max_nested_depth; + ec = error::exceeds_max_nested_depth; return {}; } diff --git a/test/test_low_level.cpp b/test/test_low_level.cpp index dadbe454..a7523061 100644 --- a/test/test_low_level.cpp +++ b/test/test_low_level.cpp @@ -409,7 +409,7 @@ generic_response const attr_e1b test(make_expected(S04e, array_type2{}, boost::redis::error::incompatible_size));\ test(make_expected(S04e, tuple_int_2{}, boost::redis::error::incompatible_size));\ test(make_expected(S04f, array_type2{}, boost::redis::error::nested_aggregate_not_supported));\ - test(make_expected(S04g, generic_response{}, boost::redis::error::exceeeds_max_nested_depth));\ + test(make_expected(S04g, generic_response{}, boost::redis::error::exceeds_max_nested_depth));\ test(make_expected(S04h, array_e1d));\ test(make_expected(S04h, array_e1e));\ test(make_expected(S04i, set_type{}, boost::redis::error::expects_resp3_set)); \ @@ -502,7 +502,7 @@ BOOST_AUTO_TEST_CASE(cover_error) { check_error("boost.redis", boost::redis::error::invalid_data_type); check_error("boost.redis", boost::redis::error::not_a_number); - check_error("boost.redis", boost::redis::error::exceeeds_max_nested_depth); + check_error("boost.redis", boost::redis::error::exceeds_max_nested_depth); check_error("boost.redis", boost::redis::error::unexpected_bool_value); check_error("boost.redis", boost::redis::error::empty_field); check_error("boost.redis", boost::redis::error::expects_resp3_simple_type);