diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-07-19 17:39:55 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-07-20 01:06:29 -0700 |
| commit | eb4028bf30bca7036c6bdc65feb321b163e84ecd (patch) | |
| tree | 2dab5bba8b6a8e6c0e95b7db47618a1e4ff280a7 /src/main.zig | |
| parent | 9d00f69be58e7b807e26ba8a38050dd486d487f4 (diff) | |
| download | zig-eb4028bf30bca7036c6bdc65feb321b163e84ecd.tar.gz zig-eb4028bf30bca7036c6bdc65feb321b163e84ecd.zip | |
add std.fmt.hex
converts an unsigned integer into an array
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig index 64cbbdffe4..561dd2f28e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4746,7 +4746,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { // the strategy is to choose a temporary file name ahead of time, and then // read this file in the parent to obtain the results, in the case the child // exits with code 3. - const results_tmp_file_nonce = Package.Manifest.hex64(std.crypto.random.int(u64)); + const results_tmp_file_nonce = std.fmt.hex(std.crypto.random.int(u64)); try child_argv.append("-Z" ++ results_tmp_file_nonce); var color: Color = .auto; @@ -7196,8 +7196,7 @@ fn createDependenciesModule( // Atomically create the file in a directory named after the hash of its contents. const basename = "dependencies.zig"; const rand_int = std.crypto.random.int(u64); - const tmp_dir_sub_path = "tmp" ++ fs.path.sep_str ++ - Package.Manifest.hex64(rand_int); + const tmp_dir_sub_path = "tmp" ++ fs.path.sep_str ++ std.fmt.hex(rand_int); { var tmp_dir = try local_cache_directory.handle.makeOpenPath(tmp_dir_sub_path, .{}); defer tmp_dir.close(); |
