Skip to content

Commit

Permalink
Bump .NET version to 8.0 (#207)
Browse files Browse the repository at this point in the history
Signed-off-by: mctaylors <[email protected]>
  • Loading branch information
mctaylors authored Dec 4, 2023
1 parent 18cdc63 commit 4c50bda
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:
uses: muno92/[email protected]
with:
solutionPath: ./Octobot.sln
ignoreIssueType: InvertIf, ConvertIfStatementToSwitchStatement
ignoreIssueType: InvertIf, ConvertIfStatementToSwitchStatement, ConvertToPrimaryConstructor
extensions: ReSharperPlugin.CognitiveComplexity
solutionWideAnalysis: true
2 changes: 1 addition & 1 deletion Octobot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.0.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/CollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static string InBlockCode(this string s, string language = "")
{
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)
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Update/ScheduledEventUpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static Result<IGuildScheduledEvent> TryGetScheduledEvent(IEnumerable<IGu
{
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();
}
Expand Down

0 comments on commit 4c50bda

Please sign in to comment.