Skip to content

Commit e93561c

Browse files
committed
Don't use with() in a destructor
1 parent 5d35c37 commit e93561c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ impl LocalQueue {
879879
// Restore the old local queue on drop.
880880
let _guard = CallOnDrop(move || {
881881
let old = old.take();
882-
LOCAL_QUEUE.with(move |slot| {
882+
let _ = LOCAL_QUEUE.try_with(move |slot| {
883883
*slot.borrow_mut() = old;
884884
});
885885
});

0 commit comments

Comments
 (0)