1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-03 20:49:54 +03:00

Bump .NET version to 8.0 (#207)

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-04 18:18:56 +03:00 committed by GitHub
parent 18cdc63883
commit 4c50bdaff7
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -8,7 +8,7 @@ public static class CollectionExtensions
this IEnumerable<TSource> source, Func<TSource, TResult> selector)
{
var list = source.ToList();
return list.Any() ? list.Max(selector) : default;
return list.Count > 0 ? list.Max(selector) : default;
}
public static void AddIfFailed(this List<Result> list, Result result)

View file

@ -45,7 +45,7 @@ public static class StringExtensions
{
s = s.SanitizeForBlockCode();
return
$"```{language}\n{s.SanitizeForBlockCode()}{(s.EndsWith("`", StringComparison.Ordinal) || string.IsNullOrWhiteSpace(s) ? " " : "")}```";
$"```{language}\n{s.SanitizeForBlockCode()}{(s.EndsWith('`') || string.IsNullOrWhiteSpace(s) ? " " : "")}```";
}
public static string Localized(this string key)

View file

@ -126,7 +126,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
{
var filtered = from.Where(schEvent => schEvent.ID == id);
var filteredArray = filtered.ToArray();
return filteredArray.Any()
return filteredArray.Length > 0
? Result<IGuildScheduledEvent>.FromSuccess(filteredArray.Single())
: new NotFoundError();
}