diff --git a/examples/rustapi_module/src/datetime.rs b/examples/rustapi_module/src/datetime.rs index cc20b6c6..14f4a071 100644 --- a/examples/rustapi_module/src/datetime.rs +++ b/examples/rustapi_module/src/datetime.rs @@ -114,6 +114,7 @@ fn get_delta_tuple<'p>(py: Python<'p>, delta: &PyDelta) -> &'p PyTuple { ) } +#[allow(clippy::too_many_arguments)] #[pyfunction] fn make_datetime<'p>( py: Python<'p>, diff --git a/examples/word-count/src/lib.rs b/examples/word-count/src/lib.rs index cf9b21e6..f06c08da 100644 --- a/examples/word-count/src/lib.rs +++ b/examples/word-count/src/lib.rs @@ -59,7 +59,7 @@ fn matches(word: &str, needle: &str) -> bool { } } } - return needle.next().is_none(); + needle.next().is_none() } /// Count the occurences of needle in line, case insensitive diff --git a/src/gil.rs b/src/gil.rs index ec3666e8..bcff6258 100644 --- a/src/gil.rs +++ b/src/gil.rs @@ -613,6 +613,7 @@ mod test { // Move obj to a thread which does not have the GIL, and clone it let t = std::thread::spawn(move || { // Cloning without GIL should not update reference count + #[allow(clippy::redundant_clone)] let _ = obj.clone(); assert_eq!(count, obj.get_refcnt()); diff --git a/tests/test_pyself.rs b/tests/test_pyself.rs index aabc5d9a..57d5eaa4 100644 --- a/tests/test_pyself.rs +++ b/tests/test_pyself.rs @@ -1,5 +1,4 @@ //! Test slf: PyRef/PyMutRef(especially, slf.into::) works -use pyo3; use pyo3::prelude::*; use pyo3::types::{PyBytes, PyString}; use pyo3::{AsPyRef, PyCell, PyIterProtocol};