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

@ -319,17 +319,17 @@ namespace osu.Game.Beatmaps
/// <summary>
/// This is a temporary method and will likely be replaced by a full-fledged (and more correctly placed) migration process in the future.
/// </summary>
public async Task ImportFromStable()
public Task ImportFromStable()
{
var stable = GetStableStorage?.Invoke();
if (stable == null)
{
Logger.Log("No osu!stable installation available!", LoggingTarget.Information, LogLevel.Error);
return;
return Task.CompletedTask;
}
await Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs").Select(f => stable.GetFullPath(f)).ToArray()), TaskCreationOptions.LongRunning);
return Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs").Select(f => stable.GetFullPath(f)).ToArray()), TaskCreationOptions.LongRunning);
}
/// <summary>