From 61a105c7c0679a81fb910b92b2555ea9d4aa6f17 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Tue, 18 Apr 2023 01:06:22 -0500 Subject: [PATCH] tmp: work towards making README.md example compile --- README.md | 2 +- src/trie.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9e2337..2cd9499 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ As an example: ```zig const std = @import("std"); const expectEqual = std.testing.expectEqual; -const HashArrayMappedTrie = @import("hamt"); +const HashArrayMappedTrie = @import("hamt").HashArrayMappedTrie ; const StringTrie = HashArrayMappedTrie([]const u8, void, StringContext); diff --git a/src/trie.zig b/src/trie.zig index 46c7a19..b127f15 100644 --- a/src/trie.zig +++ b/src/trie.zig @@ -21,7 +21,7 @@ pub fn HashArrayMappedTrie(comptime K: type, comptime V: type, comptime Context: const Node = union(enum) { kv: Pair, table: Table }; const Table = struct { map: Digest = 0, base: [*]Node }; - const Pair = struct { key: K, value: V }; + pub const Pair = struct { key: K, value: V }; pub fn init() Self { return Self{ .root = [_]?*Node{null} ** table_size };