From fbd6a66ae7116090d74e6366e9bc3b61706ec9af Mon Sep 17 00:00:00 2001 From: Matthew O'Connor Date: Fri, 16 Nov 2018 08:23:41 -0700 Subject: camelCase std.rb.set_child to std.rb.setChild --- std/rb.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'std/rb.zig') diff --git a/std/rb.zig b/std/rb.zig index 65070cb8d8..beb7f3aae9 100644 --- a/std/rb.zig +++ b/std/rb.zig @@ -104,7 +104,7 @@ pub const Node = struct { return @intToEnum(Color, @intCast(u1, node.parent_and_color & 1)); } - fn set_child(node: *Node, child: ?*Node, is_left: bool) void { + fn setChild(node: *Node, child: ?*Node, is_left: bool) void { if (is_left) { node.left = child; } else { @@ -172,7 +172,7 @@ pub const Tree = struct { node.setParent(maybe_parent); if (maybe_parent) |parent| { - parent.set_child(node, is_left); + parent.setChild(node, is_left); } else { tree.root = node; } @@ -250,7 +250,7 @@ pub const Tree = struct { // This clause is to avoid optionals if (node.left == null and node.right == null) { if (maybe_parent) |parent| { - parent.set_child(null, parent.left == node); + parent.setChild(null, parent.left == node); } else tree.root = null; color = node.getColor(); @@ -264,7 +264,7 @@ pub const Tree = struct { next = node.right.?.getFirst(); // Just checked for null above if (maybe_parent) |parent| { - parent.set_child(next, parent.left == node); + parent.setChild(next, parent.left == node); } else tree.root = next; @@ -387,7 +387,7 @@ pub const Tree = struct { if (tree.compareFn(old, new) != mem.Compare.Equal) return ReplaceError.NotEqual; if (old.getParent()) |parent| { - parent.set_child(new, parent.left == old); + parent.setChild(new, parent.left == old); } else tree.root = new; -- cgit v1.2.3