We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fffd8c4 commit c42dd44Copy full SHA for c42dd44
lib/std/Progress.zig
@@ -96,9 +96,8 @@ pub const Node = struct {
96
const presentable_children = 10;
97
98
/// 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
100
fn tryPushToParentStack(self: *Node, target_node: *Node) void {
101
- if (target_node.parent) |parent| {
+ const parent = target_node.parent orelse return;
102
inline for (parent.children) |child| if (child == self) return;
103
self.context.update_mutex.lock(); // lock below existence check for slight performance reasons
104
defer self.context.update_mutex.unlock(); // (downside: less precision, but not noticeable)
0 commit comments