Skip to content

Commit

Permalink
fixes #3561 -- silence new clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Nov 27, 2023
1 parent 0f34fcd commit fae2094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/3564.fixed.md
@@ -0,0 +1 @@
Silenced new `clippy::unnecessary_fallible_conversions` warning when using a `Py<Self>` `self` receiver
1 change: 1 addition & 0 deletions pyo3-macros-backend/src/method.rs
Expand Up @@ -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)
)

Expand Down

0 comments on commit fae2094

Please sign in to comment.