diff options
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r-- | src/libstore/s3-binary-cache-store.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index 7accad7f4..844553ad3 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -87,7 +87,11 @@ static void initAWS() }); } -S3Helper::S3Helper(const string & profile, const string & region, const string & scheme, const string & endpoint) +S3Helper::S3Helper( + const std::string & profile, + const std::string & region, + const std::string & scheme, + const std::string & endpoint) : config(makeConfig(region, scheme, endpoint)) , client(make_ref<Aws::S3::S3Client>( profile == "" @@ -121,7 +125,10 @@ class RetryStrategy : public Aws::Client::DefaultRetryStrategy } }; -ref<Aws::Client::ClientConfiguration> S3Helper::makeConfig(const string & region, const string & scheme, const string & endpoint) +ref<Aws::Client::ClientConfiguration> S3Helper::makeConfig( + const std::string & region, + const std::string & scheme, + const std::string & endpoint) { initAWS(); auto res = make_ref<Aws::Client::ClientConfiguration>(); @@ -385,7 +392,7 @@ struct S3BinaryCacheStoreImpl : virtual S3BinaryCacheStoreConfig, public virtual auto compress = [&](std::string compression) { auto compressed = nix::compress(compression, StreamToSourceAdapter(istream).drain()); - return std::make_shared<std::stringstream>(std::move(*compressed)); + return std::make_shared<std::stringstream>(std::move(compressed)); }; if (narinfoCompression != "" && hasSuffix(path, ".narinfo")) |