fixes #3561 -- silence new clippy warning

This commit is contained in:
Alex Gaynor 2023-11-07 07:51:59 -05:00
parent 0f34fcd4b7
commit fae209419c
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)
)