diff --git a/core/runtime.rs b/core/runtime.rs index bd79ca6cc0..3c2e6f3e11 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -396,12 +396,11 @@ impl JsRuntime { let mut params = options .create_params .take() - .unwrap_or_else(|| { - v8::CreateParams::default().embedder_wrapper_type_info_offsets( - V8_WRAPPER_TYPE_INDEX, - V8_WRAPPER_OBJECT_INDEX, - ) - }) + .unwrap_or_default() + .embedder_wrapper_type_info_offsets( + V8_WRAPPER_TYPE_INDEX, + V8_WRAPPER_OBJECT_INDEX, + ) .external_references(&**refs); if let Some(snapshot) = options.startup_snapshot {