Fix clippy warning of useless conversion

This commit is contained in:
David Hewitt 2020-07-17 19:06:56 +01:00
parent 525f523e55
commit c6aa7a8a47
1 changed files with 1 additions and 0 deletions

View File

@ -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)?;
}
}