diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-03-28 08:09:19 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-28 08:09:19 -0400 |
commit | da1b98b690e39ce4becf314910d046b9850f650f (patch) | |
tree | 74efb61fb65d6541623538b7e2bcfb55582ca090 /core/isolate.rs | |
parent | 1fec34b4632521068c31815c1d9f92286b6d0297 (diff) |
Clippy fixes (#2009)
Diffstat (limited to 'core/isolate.rs')
-rw-r--r-- | core/isolate.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/isolate.rs b/core/isolate.rs index b28730ba6..f8ada23d4 100644 --- a/core/isolate.rs +++ b/core/isolate.rs @@ -140,11 +140,10 @@ impl<B: Behavior> Isolate<B> { }; // If we want to use execute this has to happen here sadly. - match startup_script { - Some(s) => core_isolate + if let Some(s) = startup_script { + core_isolate .execute(s.filename.as_str(), s.source.as_str()) - .unwrap(), - None => {} + .unwrap() }; core_isolate @@ -510,9 +509,8 @@ impl IsolateHandle { /// the isolate. pub fn terminate_execution(&self) { unsafe { - match *self.shared_libdeno_isolate.lock().unwrap() { - Some(isolate) => libdeno::deno_terminate_execution(isolate), - None => (), + if let Some(isolate) = *self.shared_libdeno_isolate.lock().unwrap() { + libdeno::deno_terminate_execution(isolate) } } } |