Fix compiler warnings CS1998 and CS4014

This commit is contained in:
Ske
2019-07-21 16:43:28 +02:00
parent a078fcdf47
commit 4fe80749c4
5 changed files with 25 additions and 24 deletions

View File

@@ -157,7 +157,7 @@ namespace PluralKit.Bot {
.Build();
}
public async Task<Embed> CreateFrontPercentEmbed(SwitchStore.PerMemberSwitchDuration frontpercent, DateTimeZone tz)
public Task<Embed> CreateFrontPercentEmbed(SwitchStore.PerMemberSwitchDuration frontpercent, DateTimeZone tz)
{
var actualPeriod = frontpercent.RangeEnd - frontpercent.RangeStart;
var eb = new EmbedBuilder()
@@ -186,7 +186,7 @@ namespace PluralKit.Bot {
.Aggregate(Duration.Zero, (prod, next) => prod + next.Value)), true);
}
return eb.Build();
return Task.FromResult(eb.Build());
}
}
}