[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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user