superclasses_iter

This commit is contained in:
Quaternions 2024-09-21 14:13:19 -07:00
parent 751d4f4fb9
commit 16139847f9

View File

@ -5,9 +5,7 @@ pub fn class_is_a(class:&str,superclass:&str)->bool{
||{
let db=rbx_reflection_database::get();
match (db.classes.get(class),db.classes.get(superclass)){
(Some(class),Some(superclass))=>db.superclasses(class)
.unwrap()
.into_iter()
(Some(class),Some(superclass))=>db.superclasses_iter(class)
.any(|cls|core::ptr::addr_eq(cls,superclass)),
_=>false
}