From 0d4950a5f6047d6c8f220bfc546dce983b9a6d62 Mon Sep 17 00:00:00 2001 From: Ken Tucker Date: Wed, 18 Jun 2025 08:15:20 -0400 Subject: [PATCH] Simplify async call by removing unused variable Removed the assignment of the result from `dispatcher.RunAsync` to a variable. The discard operator `_` is now used to indicate that the result is not needed, streamlining the code. --- .../Platforms/Maui/Windows/MauiPlatformProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Caliburn.Micro.Platform/Platforms/Maui/Windows/MauiPlatformProvider.cs b/src/Caliburn.Micro.Platform/Platforms/Maui/Windows/MauiPlatformProvider.cs index 62a77b4b..d816bf03 100644 --- a/src/Caliburn.Micro.Platform/Platforms/Maui/Windows/MauiPlatformProvider.cs +++ b/src/Caliburn.Micro.Platform/Platforms/Maui/Windows/MauiPlatformProvider.cs @@ -54,7 +54,7 @@ private bool CheckAccess() public virtual void BeginOnUIThread(System.Action action) { ValidateDispatcher(); - var dummy = dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()); + _ = dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()); } ///