From 169e7374866953515e6f43fed782b8ab635ae632 Mon Sep 17 00:00:00 2001 From: player-03 Date: Mon, 2 Sep 2024 15:58:21 -0400 Subject: [PATCH] Remove unnecessary operations in `Promise`. We're allocating memory we don't use and calling functions that it would make more sense to inline. --- src/lime/app/Promise.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lime/app/Promise.hx b/src/lime/app/Promise.hx index 627f32063d..42b9420131 100644 --- a/src/lime/app/Promise.hx +++ b/src/lime/app/Promise.hx @@ -61,13 +61,13 @@ class Promise Whether the `Promise` (and related `Future`) has finished with a completion state. This will be `false` if the `Promise` has not been resolved with a completion or error state. **/ - public var isComplete(get, null):Bool; + public var isComplete(get, never):Bool; /** Whether the `Promise` (and related `Future`) has finished with an error state. This will be `false` if the `Promise` has not been resolved with a completion or error state. **/ - public var isError(get, null):Bool; + public var isError(get, never):Bool; #if commonjs private static function __init__() @@ -179,12 +179,12 @@ class Promise } // Get & Set Methods - @:noCompletion private function get_isComplete():Bool + @:noCompletion private inline function get_isComplete():Bool { return future.isComplete; } - @:noCompletion private function get_isError():Bool + @:noCompletion private inline function get_isError():Bool { return future.isError; }