Deprecation: std.stdio.File.ByChunkImpl is not visible

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Dec 24 00:57:44 UTC 2019


On Tue, Dec 24, 2019 at 12:33:34AM +0000, psyscout via Digitalmars-d-learn wrote:
[...]
> auto putObjectRequest(string bucket, string key, string file)
> {
> 	import std.stdio : File;
> 
> 	enum chunk_size = 16 * 1024; // 16 KiB
> 	auto file_ = File(file, "r");
> 
> 	return PutObjectRequest!(File.ByChunkImpl)(bucket, key,
> file_.byChunk(chunk_size), file_.size);

Hmm, try replacing the above line with:

	auto range = file_.byChunk(chunk_size);
	return PutObjectRequest!(typeof(range))(bucket, key, range, file_.size);


T

-- 
Never step over a puddle, always step around it. Chances are that whatever made it is still dripping.


More information about the Digitalmars-d-learn mailing list