We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b96a3f7 commit 54de029Copy full SHA for 54de029
src/gil.rs
@@ -704,16 +704,14 @@ mod tests {
704
assert!(gil_is_acquired());
705
}
706
707
- #[allow(clippy::needless_late_init)]
708
#[test]
709
fn dropping_gil_does_not_invalidate_references() {
710
// Acquiring GIL for the second time should be safe - see #864
711
let gil = Python::acquire_gil();
712
let py = gil.python();
713
- let obj;
714
715
let gil2 = Python::acquire_gil();
716
- obj = py.eval("object()", None, None).unwrap();
+ let obj = py.eval("object()", None, None).unwrap();
717
drop(gil2);
718
719
// After gil2 drops, obj should still have a reference count of one
0 commit comments