[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

@@ -47,10 +47,8 @@ namespace Discord
/// A task that represents the asynchronous download operation. The task result contains the downloaded
/// entity.
/// </returns>
public async Task<TEntity> DownloadAsync()
{
return await DownloadFunc().ConfigureAwait(false);
}
public Task<TEntity> DownloadAsync()
=> DownloadFunc();
/// <summary>
/// Returns the cached entity if it exists; otherwise downloads it.
@@ -103,9 +101,9 @@ namespace Discord
/// A task that represents the asynchronous download operation. The task result contains the downloaded
/// entity.
/// </returns>
public async Task<TDownloadableEntity> DownloadAsync()
public Task<TDownloadableEntity> DownloadAsync()
{
return await DownloadFunc().ConfigureAwait(false);
return DownloadFunc();
}
/// <summary>