mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
Fixed some clippy warning by adding default implementations (#31989)
* Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -411,8 +411,8 @@ impl Deref for Runtime {
|
||||
|
||||
pub struct JSEngineSetup(JSEngine);
|
||||
|
||||
impl JSEngineSetup {
|
||||
pub fn new() -> Self {
|
||||
impl Default for JSEngineSetup {
|
||||
fn default() -> Self {
|
||||
let engine = JSEngine::init().unwrap();
|
||||
*JS_ENGINE.lock().unwrap() = Some(engine.handle());
|
||||
Self(engine)
|
||||
|
||||
Reference in New Issue
Block a user