We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93c8ed3 commit 8510c1bCopy full SHA for 8510c1b
src/main.d
@@ -11,7 +11,6 @@ import std.format : format, formattedRead;
11
import std.getopt;
12
import std.path : baseName, dirName;
13
import std.stdio;
14
-import std.typecons : scoped;
15
import core.stdc.stdlib : exit;
16
import blake2d : BLAKE2D_VERSION_STRING;
17
import sha3d : SHA3D_VERSION_STRING;
@@ -450,14 +449,14 @@ int hashMmfile(const(char)[] path)
450
449
451
if (size)
452
{
453
- auto mmfile = scoped!MmFile(cast(string)path);
+ scope mmfile = new MmFile(cast(string)path);
454
455
foreach (chunk; chunks(cast(ubyte[]) mmfile[], settings.bufferSize))
456
457
settings.hasher.put(chunk);
458
}
459
460
-
+
461
settings.rawHash = settings.hasher.finish();
462
settings.hasher.reset();
463
return 0;
0 commit comments