Update type.rs

This commit is contained in:
Sunli 2021-06-17 21:02:56 +08:00
parent ee4493fef6
commit b0669cbc3f

View File

@ -34,7 +34,10 @@ impl<'a> __Type<'a> {
},
registry::MetaTypeName::Named(ty) => __Type {
registry,
detail: TypeDetail::Named(&registry.types[ty]),
detail: TypeDetail::Named(match registry.types.get(ty) {
Some(t) => t,
None => panic!("Type '{}' not found!", ty),
}),
},
}
}