aboutsummaryrefslogtreecommitdiff
path: root/lib/std/hash_map.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-02 04:51:42 -0400
committerGitHub <noreply@github.com>2021-09-02 04:51:42 -0400
commit594271f8dba0143280990ac2e01dd68a791c05b0 (patch)
tree33cfda1ae8fb44e36cc0b1e6dcdad76063f345d7 /lib/std/hash_map.zig
parent81e2034d4ad935185344030e5ecedbd1388a65e9 (diff)
parent2264fca03e6ce9203baf52d70825ec3bc32f8262 (diff)
downloadzig-594271f8dba0143280990ac2e01dd68a791c05b0.tar.gz
zig-594271f8dba0143280990ac2e01dd68a791c05b0.zip
Merge pull request #9618 from ziglang/std-os-reorg
std.os reorganization; new `usingnamespace` semantics
Diffstat (limited to 'lib/std/hash_map.zig')
-rw-r--r--lib/std/hash_map.zig8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/std/hash_map.zig b/lib/std/hash_map.zig
index 06071f0a0b..765add1e68 100644
--- a/lib/std/hash_map.zig
+++ b/lib/std/hash_map.zig
@@ -622,8 +622,12 @@ pub fn HashMap(
return other.promoteContext(self.allocator, new_ctx);
}
- /// Creates a copy of this map, using a specified allocator and context
- pub fn cloneWithAllocatorAndContext(new_allocator: *Allocator, new_ctx: anytype) !HashMap(K, V, @TypeOf(new_ctx), max_load_percentage) {
+ /// Creates a copy of this map, using a specified allocator and context.
+ pub fn cloneWithAllocatorAndContext(
+ self: Self,
+ new_allocator: *Allocator,
+ new_ctx: anytype,
+ ) !HashMap(K, V, @TypeOf(new_ctx), max_load_percentage) {
var other = try self.unmanaged.cloneContext(new_allocator, new_ctx);
return other.promoteContext(new_allocator, new_ctx);
}