Skip to content

Commit 18ed6f4

Browse files
committed
codegen: Simplify a bit the code in #1847
1 parent 4299255 commit 18ed6f4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/codegen/mod.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -3512,13 +3512,10 @@ impl TryToRustTy for Type {
35123512
inner.into_resolver().through_type_refs().resolve(ctx);
35133513
let inner_ty = inner.expect_type();
35143514

3515-
let is_objc_pointer =
3516-
inner.kind().as_type().map_or(false, |ty| {
3517-
match ty.kind() {
3518-
TypeKind::ObjCInterface(..) => true,
3519-
_ => false,
3520-
}
3521-
});
3515+
let is_objc_pointer = match inner_ty.kind() {
3516+
TypeKind::ObjCInterface(..) => true,
3517+
_ => false,
3518+
};
35223519

35233520
// Regardless if we can properly represent the inner type, we
35243521
// should always generate a proper pointer here, so use

0 commit comments

Comments
 (0)