Skip to content

Commit 33744d2

Browse files
eightbitraptormatzbot
authored andcommitted
[ruby/mmtk] Remove unnecessary null check.
the only caller of this unconditionally constructs a binding options object now, So actually this is dead code ruby/mmtk@d832004e89
1 parent 06caa59 commit 33744d2

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

gc/mmtk/src/api.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,7 @@ pub unsafe extern "C" fn mmtk_init_binding(
191191
crate::set_panic_hook();
192192

193193
let builder: Box<MMTKBuilder> = unsafe { Box::from_raw(builder) };
194-
let binding_options = if binding_options.is_null() {
195-
RubyBindingOptions {
196-
ractor_check_mode: false,
197-
suffix_size: 0,
198-
}
199-
} else {
200-
unsafe { (*binding_options).clone() }
201-
};
194+
let binding_options = unsafe { (*binding_options).clone() };
202195
let mmtk_boxed = mmtk_init(&builder);
203196
let mmtk_static = Box::leak(Box::new(mmtk_boxed));
204197

0 commit comments

Comments
 (0)