From 6261c1373168b265047db5704d9d0fd5f2e458f2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 26 Apr 2023 13:57:08 -0700 Subject: update codebase to use `@memset` and `@memcpy` --- lib/std/crypto/phc_encoding.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/crypto/phc_encoding.zig') diff --git a/lib/std/crypto/phc_encoding.zig b/lib/std/crypto/phc_encoding.zig index 4b6965d040..cc0f10e395 100644 --- a/lib/std/crypto/phc_encoding.zig +++ b/lib/std/crypto/phc_encoding.zig @@ -35,7 +35,7 @@ pub fn BinValue(comptime max_len: usize) type { pub fn fromSlice(slice: []const u8) Error!Self { if (slice.len > capacity) return Error.NoSpaceLeft; var bin_value: Self = undefined; - mem.copy(u8, &bin_value.buf, slice); + @memcpy(bin_value.buf[0..slice.len], slice); bin_value.len = slice.len; return bin_value; } -- cgit v1.2.3