Fix clippy lints
This commit is contained in:
parent
468bb765bb
commit
bcf48c0bd2
|
@ -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>,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//! Test slf: PyRef/PyMutRef<Self>(especially, slf.into::<Py>) works
|
||||
use pyo3;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::{PyBytes, PyString};
|
||||
use pyo3::{AsPyRef, PyCell, PyIterProtocol};
|
||||
|
|
Loading…
Reference in New Issue