Commit 1ef613ef authored by Shariar Azad Riday's avatar Shariar Azad Riday

Integrate review feedback

parent 605b9f29
...@@ -4,11 +4,8 @@ ...@@ -4,11 +4,8 @@
#pragma once #pragma once
#include "caf/detail/ring_buffer.hpp"
#include "caf/fwd.hpp" #include "caf/fwd.hpp"
#include <cstddef>
namespace caf::flow::step { namespace caf::flow::step {
template <class T> template <class T>
...@@ -18,17 +15,8 @@ public: ...@@ -18,17 +15,8 @@ public:
using output_type = T; using output_type = T;
explicit ignore_elements() {
// nop
}
ignore_elements(ignore_elements&&) = default;
ignore_elements(const ignore_elements&) = default;
ignore_elements& operator=(ignore_elements&&) = default;
ignore_elements& operator=(const ignore_elements&) = default;
template <class Next, class... Steps> template <class Next, class... Steps>
bool on_next(const input_type& item, Next& next, Steps&... steps) { bool on_next(const input_type&, Next&, Steps&...) {
return true; return true;
} }
......
...@@ -27,28 +27,6 @@ struct fixture { ...@@ -27,28 +27,6 @@ struct fixture {
WITH_FIXTURE(fixture) { WITH_FIXTURE(fixture) {
TEST("calling take(5) after ignore_elements on range(1, 10) produces []") {
auto result = std::vector<int>{};
SECTION("blueprint") {
ctx->make_observable().range(1, 10).ignore_elements().take(5).for_each(
[&](const int& result_observable) {
result.emplace_back(result_observable);
});
}
SECTION("observable") {
ctx->make_observable()
.range(1, 10)
.as_observable()
.ignore_elements()
.take(5)
.for_each([&](const int& result_observable) {
result.emplace_back(result_observable);
});
}
ctx->run();
check_eq(result.size(), 0u);
}
TEST("calling ignore_elements on range(1, 10) produces []") { TEST("calling ignore_elements on range(1, 10) produces []") {
auto result = std::vector<int>{}; auto result = std::vector<int>{};
SECTION("blueprint") { SECTION("blueprint") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment