Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh committed Feb 26, 2024
1 parent 7d5d310 commit 2d6ea71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions include/cinatra/coro_http_router.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ class coro_http_router {

if (whole_str.find(':') != std::string::npos) {
std::string method_str(method_name);
router_tree_->insert(whole_str, std::move(http_handler),
method_str);
router_tree_->insert(whole_str, std::move(http_handler), method_str);
}
else if (whole_str.find("{") != std::string::npos ||
whole_str.find(")") != std::string::npos) {
Expand Down
1 change: 0 additions & 1 deletion include/cinatra/coro_radix_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ struct radix_tree_node {
std::function<void(coro_http_request &req, coro_http_response &resp)>
handler,
const std::string &method) {

this->handler = handler_t{method, handler};

return 0;
Expand Down
4 changes: 2 additions & 2 deletions tests/test_coro_http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,8 +1386,8 @@ TEST_CASE("test radix tree restful api") {
client.get("http://127.0.0.1:9001/user/ultramarines/subscriptions/guilliman");
client.get("http://127.0.0.1:9001/value/guilliman/cawl/yvraine");

client.post("http://127.0.0.1:9001/user/cinatra",
"hello", req_content_type::string);
client.post("http://127.0.0.1:9001/user/cinatra", "hello",
req_content_type::string);
client.post("http://127.0.0.1:9001/user/subid/subscriptions", "hello",
req_content_type::string);
client.post("http://127.0.0.1:9001/user/ultramarines/subscriptions/guilliman",
Expand Down

0 comments on commit 2d6ea71

Please sign in to comment.