dfmt
dfmt copied to clipboard
dfmt does not support in-memory temporary files created by shell redirects
For example: dfmt <(echo "int main() {}") does not work, because dfmt tries to optimize allocation by doing a single allocation equal to the size of the file and then reading the file all at once. The size of the temporary file created by the shell redirection is ulong.max, and this causes the allocation to fail. It should be possible to just use the std.file.read free function instead of std.file.File.rawRead in this case.