diff options
author | eldritch horrors <pennae@lix.systems> | 2024-04-06 22:08:58 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-06-23 11:52:49 +0000 |
commit | 39a1e248c9e7adea312c5b7e1743a8e55da63e6c (patch) | |
tree | b49c7911ad537c1fe6731508535eda19d7c1e2c3 /src/libutil/serialise.hh | |
parent | f80d95e36dc08c796863680c9ecc6b8f495825b9 (diff) |
libutil: remove sinkToSource eof callback
this is only used in one place, and only to set a nicer error message on
EndOfFile. the only caller that actually *catches* this exception should
provide an error message in that catch block rather than forcing support
for setting error message so deep into the stack. copyStorePath is never
called outside of PathSubstitutionGoal anyway, which catches everything.
Change-Id: Ifbae8706d781c388737706faf4c8a8b7917ca278
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r-- | src/libutil/serialise.hh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh index c9294ba2d..0632e3109 100644 --- a/src/libutil/serialise.hh +++ b/src/libutil/serialise.hh @@ -338,11 +338,7 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun); * Convert a function that feeds data into a Sink into a Source. The * Source executes the function as a coroutine. */ -std::unique_ptr<Source> sinkToSource( - std::function<void(Sink &)> fun, - std::function<void()> eof = []() { - throw EndOfFile("coroutine has finished"); - }); +std::unique_ptr<Source> sinkToSource(std::function<void(Sink &)> fun); void writePadding(size_t len, Sink & sink); |