mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
Zig: use "const" for variables that are never mutated
This commit is contained in:
parent
39184b5b96
commit
5dd81ad0cd
@ -249,7 +249,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
else => {},
|
else => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
var allocator = heap.page_allocator;
|
const allocator = heap.page_allocator;
|
||||||
var walker = try src_dir.walk(allocator);
|
var walker = try src_dir.walk(allocator);
|
||||||
while (try walker.next()) |entry| {
|
while (try walker.next()) |entry| {
|
||||||
const name = entry.basename;
|
const name = entry.basename;
|
||||||
@ -280,7 +280,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
fs.Dir.makePath(cwd, out_bin_path) catch {};
|
fs.Dir.makePath(cwd, out_bin_path) catch {};
|
||||||
const out_bin_dir = try fs.Dir.openDir(cwd, out_bin_path, .{});
|
const out_bin_dir = try fs.Dir.openDir(cwd, out_bin_path, .{});
|
||||||
try test_dir.dir.copyFile("run.sh", out_bin_dir, "run.sh", .{});
|
try test_dir.dir.copyFile("run.sh", out_bin_dir, "run.sh", .{});
|
||||||
var allocator = heap.page_allocator;
|
const allocator = heap.page_allocator;
|
||||||
var walker = try test_dir.walk(allocator);
|
var walker = try test_dir.walk(allocator);
|
||||||
if (build_tests) {
|
if (build_tests) {
|
||||||
while (try walker.next()) |entry| {
|
while (try walker.next()) |entry| {
|
||||||
|
Loading…
Reference in New Issue
Block a user