2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add and use only rpl::start_with_*() methods.

This commit is contained in:
John Preston
2017-09-27 11:43:35 +03:00
parent ed061252a5
commit 086e46c162
41 changed files with 384 additions and 1113 deletions

View File

@@ -66,7 +66,7 @@ public:
std::is_assignable_v<Type, OtherType>>>
variable(rpl::producer<OtherType> &&stream) {
std::move(stream)
| start([this](auto &&data) {
| start_with_next([this](auto &&data) {
*this = std::forward<decltype(data)>(data);
}, _lifetime);
}
@@ -78,7 +78,7 @@ public:
variable &operator=(rpl::producer<OtherType> &&stream) {
_lifetime.destroy();
std::move(stream)
| start([this](auto &&data) {
| start_with_next([this](auto &&data) {
*this = std::forward<decltype(data)>(data);
}, _lifetime);
}