Skip to content

Commit 30d7f67

Browse files
committed
Refactor token cancellation check for readability
Simplified the `if` statement that checks for token cancellation by condensing it into a single line. This improves code readability and eliminates unnecessary line breaks.
1 parent 7e332fa commit 30d7f67

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ public static async ValueTask<bool> IsEverythingRunningAsync(CancellationToken t
5252

5353
try
5454
{
55-
if (token.IsCancellationRequested)
56-
return false;
57-
55+
if (token.IsCancellationRequested) return false;
5856
_ = EverythingApiDllImport.Everything_GetMajorVersion();
5957
var result = EverythingApiDllImport.Everything_GetLastError() != StateCode.IPCError;
6058
return result;

0 commit comments

Comments
 (0)