Return encoded slice from base64 encode

This commit is contained in:
frmdstryr
2020-11-16 09:38:32 -05:00
committed by Veikka Tuominen
parent 7154882423
commit 577b57784a
4 changed files with 10 additions and 11 deletions

View File

@@ -305,7 +305,7 @@ pub fn tmpDir(opts: std.fs.Dir.OpenDirOptions) TmpDir {
var random_bytes: [TmpDir.random_bytes_count]u8 = undefined;
std.crypto.random.bytes(&random_bytes);
var sub_path: [TmpDir.sub_path_len]u8 = undefined;
std.fs.base64_encoder.encode(&sub_path, &random_bytes);
_ = std.fs.base64_encoder.encode(&sub_path, &random_bytes);
var cwd = getCwdOrWasiPreopen();
var cache_dir = cwd.makeOpenPath("zig-cache", .{}) catch