From da1b98b690e39ce4becf314910d046b9850f650f Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 28 Mar 2019 08:09:19 -0400 Subject: Clippy fixes (#2009) --- core/isolate.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'core') 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 Isolate { }; // 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) } } } -- cgit v1.2.3