Fix new clippy warnings in Rust 1.63.0
This commit is contained in:
parent
6eb47c2fce
commit
db177a07ad
|
@ -6,7 +6,7 @@ use pyo3::{py_run, wrap_pyfunction};
|
|||
mod common;
|
||||
|
||||
#[pyclass]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub enum MyEnum {
|
||||
Variant,
|
||||
OtherVariant,
|
||||
|
@ -163,7 +163,7 @@ fn test_repr_parse() {
|
|||
}
|
||||
|
||||
#[pyclass(name = "MyEnum")]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub enum RenameEnum {
|
||||
Variant,
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ fn test_rename_enum_repr_correct() {
|
|||
}
|
||||
|
||||
#[pyclass]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub enum RenameVariantEnum {
|
||||
#[pyo3(name = "VARIANT")]
|
||||
Variant,
|
||||
|
|
|
@ -532,7 +532,7 @@ fn test_from_py_with_tuple_struct_error() {
|
|||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, FromPyObject, PartialEq)]
|
||||
#[derive(Debug, FromPyObject, PartialEq, Eq)]
|
||||
pub enum ZapEnum {
|
||||
Zip(#[pyo3(from_py_with = "PyAny::len")] usize),
|
||||
Zap(String, #[pyo3(from_py_with = "PyAny::len")] usize),
|
||||
|
@ -552,7 +552,7 @@ fn test_from_py_with_enum() {
|
|||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, FromPyObject, PartialEq)]
|
||||
#[derive(Debug, FromPyObject, PartialEq, Eq)]
|
||||
#[pyo3(transparent)]
|
||||
pub struct TransparentFromPyWith {
|
||||
#[pyo3(from_py_with = "PyAny::len")]
|
||||
|
|
|
@ -176,7 +176,7 @@ fn inheritance_with_new_methods_with_drop() {
|
|||
let typeobj = py.get_type::<SubClassWithDrop>();
|
||||
let inst = typeobj.call((), None).unwrap();
|
||||
|
||||
let obj: &PyCell<SubClassWithDrop> = PyTryInto::try_into(&*inst).unwrap();
|
||||
let obj: &PyCell<SubClassWithDrop> = PyTryInto::try_into(inst).unwrap();
|
||||
let mut obj_ref_mut = obj.borrow_mut();
|
||||
obj_ref_mut.data = Some(Arc::clone(&drop_called1));
|
||||
let base: &mut BaseClassWithDrop = obj_ref_mut.as_mut();
|
||||
|
|
|
@ -195,7 +195,7 @@ fn inheritance_with_new_methods_with_drop() {
|
|||
let typeobj = py.get_type::<SubClassWithDrop>();
|
||||
let inst = typeobj.call((), None).unwrap();
|
||||
|
||||
let obj: &PyCell<SubClassWithDrop> = PyTryInto::try_into(&*inst).unwrap();
|
||||
let obj: &PyCell<SubClassWithDrop> = PyTryInto::try_into(inst).unwrap();
|
||||
let mut obj_ref_mut = obj.borrow_mut();
|
||||
obj_ref_mut.data = Some(Arc::clone(&drop_called1));
|
||||
let base: &mut BaseClassWithDrop = obj_ref_mut.as_mut();
|
||||
|
|
Loading…
Reference in New Issue