From 78eb08cba40e164dee99b8ab8a528867e8c50f86 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:26:52 +0200 Subject: [PATCH] fix clippy --- src/conversions/rust_decimal.rs | 1 - src/conversions/smallvec.rs | 2 +- src/conversions/std/string.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conversions/rust_decimal.rs b/src/conversions/rust_decimal.rs index 326ef541ea5..5bbb7179e65 100644 --- a/src/conversions/rust_decimal.rs +++ b/src/conversions/rust_decimal.rs @@ -117,7 +117,6 @@ impl<'py> IntoPyObject<'py> for Decimal { #[cfg(test)] mod test_rust_decimal { use super::*; - use crate::err::PyErr; use crate::types::dict::PyDictMethods; use crate::types::PyDict; diff --git a/src/conversions/smallvec.rs b/src/conversions/smallvec.rs index 0f49c55c461..81f216c402e 100644 --- a/src/conversions/smallvec.rs +++ b/src/conversions/smallvec.rs @@ -119,7 +119,7 @@ where #[cfg(test)] mod tests { use super::*; - use crate::types::{PyDict, PyList}; + use crate::types::PyDict; #[test] fn test_smallvec_into_py() { diff --git a/src/conversions/std/string.rs b/src/conversions/std/string.rs index 890a742e5e1..4a3f6b6ed1f 100644 --- a/src/conversions/std/string.rs +++ b/src/conversions/std/string.rs @@ -155,7 +155,7 @@ impl<'py> IntoPyObject<'py> for &String { type Error = Infallible; fn into_pyobject(self, py: Python<'py>) -> Result, Self::Error> { - Ok(PyString::new_bound(py, &self)) + Ok(PyString::new_bound(py, self)) } }