Use `unguarded_switch_to` with `postgrestd` as intended
@@ -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"))]
{
