From e97ba6fab626db4b4bb35769f52d217225fdfad3 Mon Sep 17 00:00:00 2001 From: akiraveliara Date: Fri, 19 Jan 2024 19:44:29 +0100 Subject: [PATCH] use net8.0 features, small patch release time --- src/Bundles/Bundles.csproj | 2 +- src/Bundles/DictionarySlimDebugView.cs | 3 +-- src/Bundles/ValueCollections/ValueStack.cs | 2 +- tests/Bundles.Tests/Bundles.Tests.csproj | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Bundles/Bundles.csproj b/src/Bundles/Bundles.csproj index 834dbad..f0e35ff 100644 --- a/src/Bundles/Bundles.csproj +++ b/src/Bundles/Bundles.csproj @@ -4,6 +4,6 @@ true Library Bundles - 1.1.0 + 1.2.0 \ No newline at end of file diff --git a/src/Bundles/DictionarySlimDebugView.cs b/src/Bundles/DictionarySlimDebugView.cs index dee538e..20aa39f 100644 --- a/src/Bundles/DictionarySlimDebugView.cs +++ b/src/Bundles/DictionarySlimDebugView.cs @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; namespace Bundles; @@ -41,5 +40,5 @@ DictionarySlim dictionary where K : IEquatable { [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public KeyValuePair[] Items => dictionary.ToArray(); + public KeyValuePair[] Items => [.. dictionary]; } diff --git a/src/Bundles/ValueCollections/ValueStack.cs b/src/Bundles/ValueCollections/ValueStack.cs index ad149c2..5cd6d0f 100644 --- a/src/Bundles/ValueCollections/ValueStack.cs +++ b/src/Bundles/ValueCollections/ValueStack.cs @@ -26,7 +26,7 @@ public unsafe ref struct ValueStack /// public ValueStack() { - this.items = Span.Empty; + this.items = []; this.count = 0; } diff --git a/tests/Bundles.Tests/Bundles.Tests.csproj b/tests/Bundles.Tests/Bundles.Tests.csproj index 66c01a0..7da1e3b 100644 --- a/tests/Bundles.Tests/Bundles.Tests.csproj +++ b/tests/Bundles.Tests/Bundles.Tests.csproj @@ -1,10 +1,13 @@ + false true enable net8.0 + $(NoWarn);CA1869 + @@ -14,4 +17,5 @@ + \ No newline at end of file