Reduce async-await pairs

This commit is contained in:
Dean Herbert
2018-08-29 20:57:48 +09:00
parent 73c764d983
commit b1a3dfedd1
4 changed files with 12 additions and 12 deletions

View File

@ -111,10 +111,10 @@ namespace osu.Game.Skinning
byte[] IResourceStore<byte[]>.Get(string name) => GetAsync(name).Result;
public async Task<byte[]> GetAsync(string name)
public Task<byte[]> GetAsync(string name)
{
string path = getPathForFile(name);
return path == null ? null : await underlyingStore.GetAsync(path);
return path == null ? Task.FromResult<byte[]>(null) : underlyingStore.GetAsync(path);
}
#region IDisposable Support