Skip to content

Commit da4e246

Browse files
committed
Limit scope of unsafe code
1 parent 5466d9b commit da4e246

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/aether/src/darksiders1/code/vigil/gfc/base/reflection.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ struct_wrapper_super!(Class, gfc::IRefObject);
99

1010
impl Class {
1111
pub fn new_instance(&self) -> gfc::AutoRef<gfc::Object> {
12-
unsafe {
13-
let obj = init_with(|p| {
12+
let obj = unsafe {
13+
init_with(|p| {
1414
self.inner.newInstance(p);
15-
});
16-
obj.lift()
17-
}
15+
})
16+
};
17+
obj.lift()
1818
}
1919

2020
pub fn name(&self) -> &gfc::HString {

0 commit comments

Comments
 (0)