mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Updated fixes to some clippy warnings in components/script
This commit is contained in:
parent
e74a03724f
commit
2a37c3dec8
58 changed files with 156 additions and 265 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue