diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-24 00:44:57 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-07-05 22:28:16 +0000 |
commit | f4f6d1d8e24a092422fcec601e21683179b735c9 (patch) | |
tree | e90edb17aea9aefc7449d1b3723ffb3b0a5bec59 /src/libstore/local-store.cc | |
parent | 06220a71c1430c97bfcd8012b00530a987e40e97 (diff) |
libutil: convert readFileSource to a generator
Change-Id: I5f92b15fd367d46eb047d74ab6e317b4f51a46d3
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index ce5af0082..98e4d7efe 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1890,7 +1890,7 @@ ContentAddress LocalStore::hashCAPath( HashModuloSink caSink ( hashType, std::string(pathHash) ); std::visit(overloaded { [&](const TextIngestionMethod &) { - readFileSource(path)->drainInto(caSink); + caSink << readFileSource(path); }, [&](const FileIngestionMethod & m2) { switch (m2) { @@ -1898,7 +1898,7 @@ ContentAddress LocalStore::hashCAPath( caSink << dumpPath(path); break; case FileIngestionMethod::Flat: - readFileSource(path)->drainInto(caSink); + caSink << readFileSource(path); break; } }, |