Skip to content

Commit c42dd44

Browse files
DISTREATVexu
andcommitted
std.Progress: remove confusing comment
Co-authored-by: Veikka Tuominen <[email protected]>
1 parent fffd8c4 commit c42dd44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/std/Progress.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ pub const Node = struct {
9696
const presentable_children = 10;
9797

9898
/// Push this `Node` to the `parent.children` stack of the provided `Node` (insert at first index). Thread-safe
99-
/// Returns void if `parent` is null
10099
fn tryPushToParentStack(self: *Node, target_node: *Node) void {
101-
if (target_node.parent) |parent| {
100+
const parent = target_node.parent orelse return;
102101
inline for (parent.children) |child| if (child == self) return;
103102
self.context.update_mutex.lock(); // lock below existence check for slight performance reasons
104103
defer self.context.update_mutex.unlock(); // (downside: less precision, but not noticeable)

0 commit comments

Comments
 (0)