Change from `async Task` to `Task`

Because the async is the wrapper of Task, we don't need to use async
again.
This commit is contained in:
MaleDong 2018-07-30 09:56:25 +08:00
parent 0a7b2e225f
commit 09a6d60620
1 changed files with 6 additions and 6 deletions

View File

@ -388,24 +388,24 @@ namespace IP2Region
/// <summary>
/// Get the region throught the ip address with memory binary search algorithm.
/// </summary>
public async Task<DataBlock> AsyncMemorySearch(string ip)
public Task<DataBlock> AsyncMemorySearch(string ip)
{
return await Task.FromResult(MemorySearch(ip));
return Task.FromResult(MemorySearch(ip));
}
/// <summary>
/// Get the region throught the ip address with b-tree search algorithm.
/// </summary>
public async Task<DataBlock> AsyncBtreeSearch(string ip)
public Task<DataBlock> AsyncBtreeSearch(string ip)
{
return await Task.FromResult(BtreeSearch(ip));
return Task.FromResult(BtreeSearch(ip));
}
/// <summary>
/// Get the region throught the ip address with binary search algorithm.
/// </summary>
public async Task<DataBlock> AsyncBinarySearch(string ip)
public Task<DataBlock> AsyncBinarySearch(string ip)
{
return await Task.FromResult(BinarySearch(ip));
return Task.FromResult(BinarySearch(ip));
}
#endregion