superclasses_iter
This commit is contained in:
parent
751d4f4fb9
commit
16139847f9
@ -5,9 +5,7 @@ pub fn class_is_a(class:&str,superclass:&str)->bool{
|
|||||||
||{
|
||{
|
||||||
let db=rbx_reflection_database::get();
|
let db=rbx_reflection_database::get();
|
||||||
match (db.classes.get(class),db.classes.get(superclass)){
|
match (db.classes.get(class),db.classes.get(superclass)){
|
||||||
(Some(class),Some(superclass))=>db.superclasses(class)
|
(Some(class),Some(superclass))=>db.superclasses_iter(class)
|
||||||
.unwrap()
|
|
||||||
.into_iter()
|
|
||||||
.any(|cls|core::ptr::addr_eq(cls,superclass)),
|
.any(|cls|core::ptr::addr_eq(cls,superclass)),
|
||||||
_=>false
|
_=>false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user