From f95187e4705a91375f3a4ada4dee0791777bcfd1 Mon Sep 17 00:00:00 2001 From: Froxcey Date: Thu, 25 Apr 2024 19:34:09 +0800 Subject: [PATCH] Replace ComptimeStringMap with StaticStringMap The nightly zig std renamed ComptimeStringMap to StaticStringMap, with some small changes. This commit updates the codebase to be compatible with the latest changes. Reference: ziglang/zig#19719 --- src/zmd/tokens.zig | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/zmd/tokens.zig b/src/zmd/tokens.zig index 3205f87..cc8edc1 100644 --- a/src/zmd/tokens.zig +++ b/src/zmd/tokens.zig @@ -66,13 +66,10 @@ pub const elements = [_]Element{ .{ .type = .ordered_list_item, .syntax = "1. ", .close = .linebreak, .clear = true }, }; -pub const toggles = std.ComptimeStringMap( - Element, - .{ - .{ "code", .{ .type = .code_close, .syntax = "`" } }, - .{ "block", .{ .type = .block_close, .syntax = "```" } }, - }, -); +pub const toggles = std.StaticStringMap(Element).initComptime(.{ + .{ "code", .{ .type = .code_close, .syntax = "`" } }, + .{ "block", .{ .type = .block_close, .syntax = "```" } }, +}); pub const formatters = [_]Element{ .{ .type = .bold, .syntax = "**", .close = .bold_close },