1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

Sink: Use std::string_view

This commit is contained in:
Eelco Dolstra 2020-12-02 14:00:43 +01:00
parent aa68486112
commit faa31f4084
21 changed files with 182 additions and 211 deletions

View file

@ -857,7 +857,7 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source *
if (!source) throw Error("no source");
size_t len = readNum<size_t>(from);
auto buf = std::make_unique<unsigned char[]>(len);
writeString(buf.get(), source->read(buf.get(), len), to);
writeString({(const char *) buf.get(), source->read(buf.get(), len)}, to);
to.flush();
}