mirror of
https://github.com/NixOS/nix
synced 2025-07-04 15:31:47 +02:00
sourceToSink(): Fix abort
This commit is contained in:
parent
ca0f7db843
commit
b8684eb447
1 changed files with 1 additions and 5 deletions
|
@ -218,13 +218,9 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
|
||||||
|
|
||||||
void finish() override
|
void finish() override
|
||||||
{
|
{
|
||||||
if (!coro) return;
|
if (coro && *coro)
|
||||||
if (!*coro) abort();
|
|
||||||
{
|
|
||||||
(*coro)(true);
|
(*coro)(true);
|
||||||
}
|
}
|
||||||
if (*coro) abort();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return std::make_unique<SourceToSink>(fun);
|
return std::make_unique<SourceToSink>(fun);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue