Skip to content

Commit

Permalink
fix: clang-format failed
Browse files Browse the repository at this point in the history
  • Loading branch information
4kangjc committed Jan 14, 2023
1 parent b093187 commit 206546f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
fetch-depth: 0
- name: install clang-format
run: |
pip3 install clang-format
sudo apt install -y clang-format
clang-format --version
- name: check-diff
run: |
diff=`git-clang-format --diff HEAD^`
Expand Down
6 changes: 3 additions & 3 deletions async_simple/coro/Generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ using range_reference_t = std::iter_reference_t<iterator_t<R>>;
template <class T>
concept input_range = range<T> && std::input_iterator<iterator_t<T>>;

} // namespace internal

// clang-format on

} // namespace internal

#ifdef _MSC_VER
#define EMPTY_BASES __declspec(empty_bases)
#ifdef __clang__
Expand Down Expand Up @@ -491,7 +491,6 @@ class Generator<Ref, V, Allocator>::promise_type
template <class R, class Alloc>
requires std::convertible_to<ranges::internal::range_reference_t<R>, yielded>
auto yield_value(ranges::elements_of<R, Alloc> r) noexcept {
// clang-format on
auto nested = [](std::allocator_arg_t, Alloc,
ranges::internal::iterator_t<R> i,
ranges::internal::sentinel_t<R> s)
Expand All @@ -504,6 +503,7 @@ class Generator<Ref, V, Allocator>::promise_type
nested(std::allocator_arg, r.allocator, std::ranges::begin(r.range),
std::ranges::end(r.range))});
}
// clang-format on

void return_void() noexcept {}
void await_transform() = delete;
Expand Down

1 comment on commit 206546f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 206546f Previous: 38c1534 Ratio
Uthread_call_depth_bench/8/iterations:3 2933.3333297169397 ns/iter 1033.3333193557337 ns/iter 2.84
Uthread_call_depth_bench/16/iterations:3 2733.333341590575 ns/iter 1066.6666791318373 ns/iter 2.56
Uthread_call_depth_bench/32/iterations:3 2733.333341590575 ns/iter 966.6666566469454 ns/iter 2.83
Uthread_call_depth_bench/512/iterations:3 2533.333334516404 ns/iter 1399.9999926757785 ns/iter 1.81
Uthread_call_depth_bench/1024/iterations:3 2666.6666599339806 ns/iter 1100.0000010123283 ns/iter 2.42
Uthread_call_depth_bench/2048/iterations:3 2700.000000762278 ns/iter 1033.33333830354 ns/iter 2.61
Lazy_call_depth_bench/4/iterations:3 5866.999989242079 ns/iter 1866.6666695329088 ns/iter 3.14
Lazy_call_depth_bench/8/iterations:3 5900.000000262177 ns/iter 2266.6666647334446 ns/iter 2.60
Lazy_call_depth_bench/16/iterations:3 7600.333333357412 ns/iter 2666.6666599339806 ns/iter 2.85
Lazy_call_depth_bench/32/iterations:3 9900.333338919154 ns/iter 3533.333331991647 ns/iter 2.80
Lazy_call_depth_bench/512/iterations:3 79236.00001428592 ns/iter 26900.000004085694 ns/iter 2.95

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.