Merge pull request #3564 from PyO3/alex-patch-1

fixes #3561 -- silence new clippy warning
This commit is contained in:
Alex Gaynor 2023-11-27 22:41:50 +00:00 committed by GitHub
commit 5080deedbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
Silenced new `clippy::unnecessary_fallible_conversions` warning when using a `Py<Self>` `self` receiver

View File

@ -182,6 +182,7 @@ impl SelfType {
.map_err(::std::convert::Into::<_pyo3::PyErr>::into)
.and_then(
#[allow(clippy::useless_conversion)] // In case slf is PyCell<Self>
#[allow(unknown_lints, clippy::unnecessary_fallible_conversions)] // In case slf is Py<Self> (unknown_lints can be removed when MSRV is 1.75+)
|cell| ::std::convert::TryFrom::try_from(cell).map_err(::std::convert::Into::into)
)