Fix a few more compiler warnings

Signed-off-by: Ske <voltasalt@gmail.com>
This commit is contained in:
Ske
2021-05-07 10:56:15 +02:00
parent dd2c669cd2
commit dbde8c07ad
6 changed files with 18 additions and 12 deletions

View File

@@ -151,10 +151,11 @@ namespace Myriad.Cache
public bool TryGetRole(ulong roleId, out Role role) =>
_roles.TryGetValue(roleId, out role!);
public async IAsyncEnumerable<Guild> GetAllGuilds()
public IAsyncEnumerable<Guild> GetAllGuilds()
{
foreach (var guild in _guilds.Values)
yield return guild.Guild;
return _guilds.Values
.Select(g => g.Guild)
.ToAsyncEnumerable();
}
public IEnumerable<Channel> GetGuildChannels(ulong guildId)

View File

@@ -19,6 +19,7 @@
<PackageReference Include="Polly" Version="7.2.1" />
<PackageReference Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="System.Linq.Async" Version="5.0.0" />
</ItemGroup>
</Project>