mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Sink: Use std::string_view
This commit is contained in:
parent
aa68486112
commit
faa31f4084
21 changed files with 182 additions and 211 deletions
|
@ -772,8 +772,8 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
|
|||
}
|
||||
|
||||
auto source = sinkToSource([&](Sink & sink) {
|
||||
LambdaSink progressSink([&](const unsigned char * data, size_t len) {
|
||||
total += len;
|
||||
LambdaSink progressSink([&](std::string_view data) {
|
||||
total += data.size();
|
||||
act.progress(total, info->narSize);
|
||||
});
|
||||
TeeSink tee { sink, progressSink };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue