Skip to content

Commit 54de029

Browse files
davidhewittmessense
authored andcommitted
rust: clippy fixes 1.59
1 parent b96a3f7 commit 54de029

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gil.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,16 +704,14 @@ mod tests {
704704
assert!(gil_is_acquired());
705705
}
706706

707-
#[allow(clippy::needless_late_init)]
708707
#[test]
709708
fn dropping_gil_does_not_invalidate_references() {
710709
// Acquiring GIL for the second time should be safe - see #864
711710
let gil = Python::acquire_gil();
712711
let py = gil.python();
713-
let obj;
714712

715713
let gil2 = Python::acquire_gil();
716-
obj = py.eval("object()", None, None).unwrap();
714+
let obj = py.eval("object()", None, None).unwrap();
717715
drop(gil2);
718716

719717
// After gil2 drops, obj should still have a reference count of one

0 commit comments

Comments
 (0)