diff options
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index bd79ca6cc..3c2e6f3e1 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 { |