From 57c1db59b2ed9f120f9025551489eda64e2ab22c Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Wed, 20 Nov 2024 17:17:35 +0100 Subject: [PATCH] Leak utility funtion now return immutable reference --- src/utility.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility.rs b/src/utility.rs index 8084cb1..d804f40 100644 --- a/src/utility.rs +++ b/src/utility.rs @@ -1,3 +1,3 @@ -pub fn leak < 'l , T > ( inner : T ) -> & 'l mut T { +pub fn leak < 'l , T > ( inner : T ) -> & 'l T { Box :: leak ( Box :: new (inner) ) }