Skip to content

Commit 058af11

Browse files
committed
pyfunction: fix clippy lint on **kwargs argument
1 parent 73c8532 commit 058af11

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
- Fix visibility of `PyDictItems`, `PyDictKeys`, and `PyDictValues` types added in PyO3 0.17.0.
1414
- Fix compile failure when using `#[pyo3(from_py_with = "...")]` attribute on an argument of type `Option<T>`. [#2592](https://github.com/PyO3/pyo3/pull/2592)
15+
- Fix clippy `redundant-closure` lint on `**kwargs` arguments for `#[pyfunction]` and `#[pymethods]`. [#2595](https://github.com/PyO3/pyo3/pull/2595)
1516

1617
## [0.17.0] - 2022-08-23
1718

pyo3-macros-backend/src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ fn impl_arg_param(
220220
);
221221
return Ok(quote_arg_span! {
222222
_pyo3::impl_::extract_argument::extract_optional_argument(
223-
_kwargs.map(|kwargs| kwargs.as_ref()),
223+
_kwargs.map(::std::convert::AsRef::as_ref),
224224
&mut { _pyo3::impl_::extract_argument::FunctionArgumentHolder::INIT },
225225
#name_str
226226
)?

0 commit comments

Comments
 (0)