clippy: Fix from_over_into warnings (#31946)

This commit is contained in:
eri 2024-03-30 12:30:14 +01:00 committed by GitHub
parent e3d6b66d5f
commit a7ad92d9a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 24 deletions

View file

@ -543,9 +543,9 @@ pub enum ProtoOrIfaceIndex {
Constructor(PrototypeList::Constructor),
}
impl Into<usize> for ProtoOrIfaceIndex {
fn into(self) -> usize {
match self {
impl From<ProtoOrIfaceIndex> for usize {
fn from(index: ProtoOrIfaceIndex) -> usize {
match index {
ProtoOrIfaceIndex::ID(id) => id as usize,
ProtoOrIfaceIndex::Constructor(constructor) => constructor as usize,
}