mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01: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:
parent
62a916ce5c
commit
df457c43c8
10 changed files with 28 additions and 71 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue