[Refactor] Remove some unnecessary async/await (#2739)

* Remove some unnecessary async/await

* More not-so-async stuff

* More not-so-async stuff

* Fix merge issue
This commit is contained in:
Dmitry
2023-11-19 00:29:14 +03:00
committed by GitHub
parent 699554ad11
commit 86655a8157
73 changed files with 1020 additions and 1020 deletions

View File

@@ -177,14 +177,11 @@ namespace Discord
await _logger.InfoAsync("Disconnected").ConfigureAwait(false);
}
public async Task CompleteAsync()
{
await _readyPromise.TrySetResultAsync(true).ConfigureAwait(false);
}
public async Task WaitAsync()
{
await _readyPromise.Task.ConfigureAwait(false);
}
public Task CompleteAsync()
=> _readyPromise.TrySetResultAsync(true);
public Task WaitAsync()
=> _readyPromise.Task;
public void Cancel()
{