Add leak_mut convenience function
This commit is contained in:
parent
6021fb5901
commit
8639e08ac5
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
pub fn leak < 'l , Type > ( inner : Type ) -> & 'l Type {
|
pub fn leak < 'l , Type > ( inner : Type ) -> & 'l Type {
|
||||||
Box :: leak ( Box :: new (inner) )
|
Box :: leak ( Box :: new (inner) )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn leak_mut < 'l , Type > ( inner : Type ) -> & 'l mut Type {
|
||||||
|
Box :: leak ( Box :: new (inner) )
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue