diff --git a/CHANGELOG.md b/CHANGELOG.md index b06bff83..9bd7a409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix visibility of `PyDictItems`, `PyDictKeys`, and `PyDictValues` types added in PyO3 0.17.0. - Fix compile failure when using `#[pyo3(from_py_with = "...")]` attribute on an argument of type `Option`. [#2592](https://github.com/PyO3/pyo3/pull/2592) +- Fix clippy `redundant-closure` lint on `**kwargs` arguments for `#[pyfunction]` and `#[pymethods]`. [#2595](https://github.com/PyO3/pyo3/pull/2595) ## [0.17.0] - 2022-08-23 diff --git a/pyo3-macros-backend/src/params.rs b/pyo3-macros-backend/src/params.rs index c64de728..e54a6d5f 100644 --- a/pyo3-macros-backend/src/params.rs +++ b/pyo3-macros-backend/src/params.rs @@ -220,7 +220,7 @@ fn impl_arg_param( ); return Ok(quote_arg_span! { _pyo3::impl_::extract_argument::extract_optional_argument( - _kwargs.map(|kwargs| kwargs.as_ref()), + _kwargs.map(::std::convert::AsRef::as_ref), &mut { _pyo3::impl_::extract_argument::FunctionArgumentHolder::INIT }, #name_str )?