Improve reify! syntax.

This commit is contained in:
Stephen Chung
2022-12-09 16:41:01 +08:00
parent 3d5908480a
commit 30ff208104
9 changed files with 64 additions and 68 deletions

View File

@@ -307,7 +307,7 @@ impl<'a> NativeCallContext<'a> {
.and_then(|result| {
// Bail out early if the return type needs no cast
if TypeId::of::<T>() == TypeId::of::<Dynamic>() {
return Ok(reify!(result => T));
return Ok(reify! { result => T });
}
let typ = self.engine().map_type_name(result.type_name());
@@ -338,7 +338,7 @@ impl<'a> NativeCallContext<'a> {
.and_then(|result| {
// Bail out early if the return type needs no cast
if TypeId::of::<T>() == TypeId::of::<Dynamic>() {
return Ok(reify!(result => T));
return Ok(reify! { result => T });
}
let typ = self.engine().map_type_name(result.type_name());