From b0bdb911e3364cf22b617828cb1c3bb8947e7c9b Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sat, 11 Nov 2023 21:31:55 +0100 Subject: [PATCH] fix deprecations for dip1000 changes impossible to represent with D's type system, so we mark these things as trusted, so that dependees can use them safely after having this library manually checked by us authors. --- src/containers/ttree.d | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/containers/ttree.d b/src/containers/ttree.d index 5e7e908..6c1db3f 100644 --- a/src/containers/ttree.d +++ b/src/containers/ttree.d @@ -906,7 +906,7 @@ private: { newRoot = right.left; newRoot.parent = this.parent; - newRoot.left = &this; + newRoot.left = (() @trusted => &this)(); newRoot.left.parent = newRoot; newRoot.right = right; newRoot.right.parent = newRoot; @@ -920,8 +920,8 @@ private: newRoot.parent = this.parent; right = newRoot.left; if (right !is null) - right.parent = &this; - newRoot.left = &this; + right.parent = (() @trusted => &this)(); + newRoot.left = (() @trusted => &this)(); this.parent = newRoot; } cleanup(newRoot, root, allocator); @@ -934,7 +934,7 @@ private: { newRoot = left.right; newRoot.parent = this.parent; - newRoot.right = &this; + newRoot.right = (() @trusted => &this)(); newRoot.right.parent = newRoot; newRoot.left = left; newRoot.left.parent = newRoot; @@ -948,8 +948,8 @@ private: newRoot.parent = this.parent; left = newRoot.right; if (left !is null) - left.parent = &this; - newRoot.right = &this; + left.parent = (() @trusted => &this)(); + newRoot.right = (() @trusted => &this)(); this.parent = newRoot; } cleanup(newRoot, root, allocator);