Skip to content

Commit

Permalink
Use unguarded_switch_to with postgrestd as intended (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee authored Sep 21, 2022
1 parent 48faf5d commit 3894728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgx/src/memcxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl PgMemoryContexts {
pub fn leak_trivial_alloc<T>(&mut self, v: T) -> *mut T {
#[cfg(feature = "postgrestd")]
{
self.switch_to(|_cx| Box::leak(Box::new(v)))
self.unguarded_switch_to(|_cx| Box::leak(Box::new(v)))
}
#[cfg(not(feature = "postgrestd"))]
{
Expand Down

0 comments on commit 3894728

Please sign in to comment.