aboutsummaryrefslogtreecommitdiff
path: root/lib/std/tz.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-29 00:19:55 -0700
committerGitHub <noreply@github.com>2023-04-29 00:19:55 -0700
commitd65b42e07caa00dfe2f2fbf221c593ce57882784 (patch)
tree7926cbea1499e0affe930bf6d7455dc24adf014e /lib/std/tz.zig
parentfd6200eda6d4fe19c34a59430a88a9ce38d6d7a4 (diff)
parentfa200ca0cad2705bad40eb723dedf4e3bf11f2ff (diff)
downloadzig-d65b42e07caa00dfe2f2fbf221c593ce57882784.tar.gz
zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.zip
Merge pull request #15481 from ziglang/use-mem-intrinsics
actually use the new memory intrinsics
Diffstat (limited to 'lib/std/tz.zig')
-rw-r--r--lib/std/tz.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/tz.zig b/lib/std/tz.zig
index 76eb3b06fc..0cb9cefa50 100644
--- a/lib/std/tz.zig
+++ b/lib/std/tz.zig
@@ -137,7 +137,7 @@ pub const Tz = struct {
const name = std.mem.sliceTo(designators[tt.name_data[0]..], 0);
// We are mandating the "SHOULD" 6-character limit so we can pack the struct better, and to conform to POSIX.
if (name.len > 6) return error.Malformed; // rfc8536: Time zone designations SHOULD consist of at least three (3) and no more than six (6) ASCII characters.
- std.mem.copy(u8, tt.name_data[0..], name);
+ @memcpy(tt.name_data[0..name.len], name);
tt.name_data[name.len] = 0;
}