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 c42dd44 commit b3df6feCopy full SHA for b3df6fe
lib/std/Progress.zig
@@ -107,9 +107,8 @@ pub const Node = struct {
107
}
108
109
/// Remove this `Node` from the `parent.children` stack of the provided `Node`. Thread-safe
110
- /// Returns void if `parent` is null
111
fn tryRemoveFromParentStack(self: *Node, target_node: *Node) void {
112
- if (target_node.parent) |parent| {
+ const parent = target_node.parent orelse return;
113
self.context.update_mutex.lock();
114
defer self.context.update_mutex.unlock();
115
const index = std.mem.indexOfScalar(?*Node, parent.children[0..], self) orelse return;
0 commit comments