diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-19 22:22:18 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-07-03 11:46:53 +0000 |
commit | 5eec6418de35daaa7b14b5412e39d85ce80a37cb (patch) | |
tree | 6fb0e3531d12e3c6614e5e5638b84e8096436b61 /src/libstore/daemon.cc | |
parent | c65f5dd18e5f937e25cc16da9dac61e403ef5982 (diff) |
libutil: begin porting serialization to generators
generators are a better basis for serializers than streaming into sinks
as we do currently for many reasons, such as being usable as sources if
one wishes to (without requiring an intermediate sink to serialize full
data sets into memory, or boost coroutines to turn sinks into sources),
composing more naturally (as one can just yield a sub-generator instead
of being forced to wrap entire substreams into clunky functions or even
more clunky custom types to implement operator<< on), allowing wrappers
to transform data with clear ownership semantics (removing the need for
explicit memory allocations and Source wrappers), and many other things
Change-Id: I361d89ff556354f6930d9204f55117565f2f7f20
Diffstat (limited to 'src/libstore/daemon.cc')
-rw-r--r-- | src/libstore/daemon.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 6d64644d1..cdc9c09c7 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -160,8 +160,7 @@ struct TunnelSink : Sink TunnelSink(Sink & to) : to(to) { } void operator () (std::string_view data) { - to << STDERR_WRITE; - writeString(data, to); + to << STDERR_WRITE << data; } }; |