Skip to content

Commit

Permalink
Merge pull request #1049 from davidhewitt/fix-clippy-useless-conversion
Browse files Browse the repository at this point in the history
Fix clippy warning of useless conversion
  • Loading branch information
kngwyu committed Jul 18, 2020
2 parents 525f523 + c6aa7a8 commit d9d095c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyo3-derive-backend/src/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl SelfType {
SelfType::TryFromPyCell(span) => {
quote_spanned! { *span =>
let _cell = _py.from_borrowed_ptr::<pyo3::PyCell<#cls>>(_slf);
#[allow(clippy::useless_conversion)] // In case _slf is PyCell<Self>
let _slf = std::convert::TryFrom::try_from(_cell)?;
}
}
Expand Down

0 comments on commit d9d095c

Please sign in to comment.