Skip to content

Commit 96e0333

Browse files
run clang format
1 parent ed3291e commit 96e0333

File tree

2 files changed

+19
-31
lines changed

2 files changed

+19
-31
lines changed

include/beman/execution/detail/bulk.hpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828
#include <type_traits>
2929
#include <utility>
3030

31-
3231
#include <beman/execution/detail/suppress_push.hpp>
3332
namespace beman::execution::detail {
3433

3534
struct bulk_t {
3635

37-
3836
template <class Sender, class Shape, class f>
3937
requires(::beman::execution::sender<Sender> && std::is_integral_v<Shape> &&
4038
::beman::execution::detail::movable_value<f>)
@@ -56,8 +54,8 @@ struct impls_for<bulk_t> : ::beman::execution::detail::default_impls {
5654
Index, State& state, Rcvr& rcvr, Tag, Args&&... args) noexcept -> void
5755
requires(not::std::same_as<Tag, set_value_t> ||
5856
requires(State& s, Args&&... a) {
59-
(s.template get<1>())(s.template get<0>(), ::std::forward<Args>(a)...);
60-
})
57+
(s.template get<1>())(s.template get<0>(), ::std::forward<Args>(a)...);
58+
})
6159
{
6260
if constexpr (std::same_as<Tag, set_value_t>) {
6361
auto& [shape, f] = state;
@@ -98,20 +96,19 @@ struct completion_signatures_for_impl<
9896
using make_error_completions =
9997
::beman::execution::completion_signatures<::beman::execution::set_error_t(const std::decay_t<Args>&)...>;
10098

101-
// Retrieves the value completion signatures from the Sender using Env,
99+
// Retrieves the value completion signatures from the Sender using Env,
102100
// then applies `make_value_completions` to format them and merges all signatures.
103101
using value_completions = ::beman::execution::
104102
value_types_of_t<Sender, Env, make_value_completions, ::beman::execution::detail::meta::combine>;
105103

106-
// Retrieves the error completion signatures from the Sender using Env,
104+
// Retrieves the error completion signatures from the Sender using Env,
107105
// then applies make_error_completions to format them.
108106
using error_completions = ::beman::execution::error_types_of_t<Sender, Env, make_error_completions>;
109107

110108
using fixed_completions =
111109
::beman::execution::completion_signatures<::beman::execution::set_stopped_t(),
112110
::beman::execution::set_error_t(std::exception_ptr)>;
113111

114-
115112
using type = ::beman::execution::detail::meta::unique<
116113
::beman::execution::detail::meta::combine<fixed_completions, value_completions, error_completions>>;
117114
};

tests/beman/execution/exec-bulk.test.cpp

+15-24
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,30 @@
77
#include <beman/execution/detail/bulk.hpp>
88
#include <beman/execution/detail/just.hpp>
99

10+
auto test_bulk() {
11+
auto b0 = test_std::bulk(test_std::just(), 1, [](int) {});
1012

13+
static_assert(test_std::sender<decltype(b0)>);
1114

15+
int counter = 0;
1216

13-
auto test_bulk(){
14-
auto b0 = test_std::bulk(test_std::just(), 1, [](int) {});
15-
16-
static_assert(test_std::sender<decltype(b0)>);
17-
18-
int counter = 0;
19-
20-
auto b1 = test_std::bulk(test_std::just(), 5, [&](int i) {
21-
counter += i;
22-
});
23-
24-
static_assert(test_std::sender<decltype(b1)>);
25-
test_std::sync_wait(b1);
26-
ASSERT(counter == 10);
17+
auto b1 = test_std::bulk(test_std::just(), 5, [&](int i) { counter += i; });
2718

19+
static_assert(test_std::sender<decltype(b1)>);
20+
test_std::sync_wait(b1);
21+
ASSERT(counter == 10);
2822
}
2923

30-
TEST(exec_bulk){
24+
TEST(exec_bulk) {
3125

26+
try {
3227

33-
try {
28+
test_bulk();
3429

35-
test_bulk();
30+
} catch (...) {
3631

37-
} catch (...) {
38-
39-
ASSERT(nullptr == "the bulk tests shouldn't throw");
40-
}
41-
42-
return EXIT_SUCCESS;
32+
ASSERT(nullptr == "the bulk tests shouldn't throw");
33+
}
4334

35+
return EXIT_SUCCESS;
4436
}
45-

0 commit comments

Comments
 (0)