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 };