diff --git a/src/Core/Utilities/SpanExtensions.cs b/src/Core/Utilities/SpanExtensions.cs index 8d9723629e..1bd18d2981 100644 --- a/src/Core/Utilities/SpanExtensions.cs +++ b/src/Core/Utilities/SpanExtensions.cs @@ -27,7 +27,7 @@ public static class SpanExtensions var count = 0; int pos; - while((pos = span.IndexOf(value)) >= 0) + while ((pos = span.IndexOf(value)) >= 0) { span = span[++pos..]; count++; diff --git a/test/Core.Test/Utilities/EncryptedStringAttributeTests.cs b/test/Core.Test/Utilities/EncryptedStringAttributeTests.cs index c448415709..ecc455d634 100644 --- a/test/Core.Test/Utilities/EncryptedStringAttributeTests.cs +++ b/test/Core.Test/Utilities/EncryptedStringAttributeTests.cs @@ -106,10 +106,10 @@ public class EncryptedStringAttributeTests var underlyingType = typeof(EncryptionType).GetEnumUnderlyingType(); var expectedType = typeof(byte); - Assert.True(underlyingType == expectedType, + Assert.True(underlyingType == expectedType, $"Hello future person, it seems you have changed the underlying type for {nameof(EncryptionType)}, " + $"that is totally fine you just also need to change the line for {expectedType.Name}.TryParse in " + - $"{nameof(EncryptedStringAttribute)} to {underlyingType.Name}.TryParse (but you can probably use the alias)" + + $"{nameof(EncryptedStringAttribute)} to {underlyingType.Name}.TryParse (but you can probably use the alias)" + "and then update this test!"); } } diff --git a/test/Core.Test/Utilities/SpanExtensionsTests.cs b/test/Core.Test/Utilities/SpanExtensionsTests.cs index 7f47be7b8a..ca0ce7fba6 100644 --- a/test/Core.Test/Utilities/SpanExtensionsTests.cs +++ b/test/Core.Test/Utilities/SpanExtensionsTests.cs @@ -1,4 +1,4 @@ -using Bit.Core.Utilities; +using Bit.Core.Utilities; using Xunit; #nullable enable @@ -42,9 +42,9 @@ public class SpanExtensionsTests } [Theory] - [InlineData(new [] {5, 4}, 5, 1)] - [InlineData(new [] { 1 }, 5, 0)] - [InlineData(new [] { 5, 5, 5}, 5, 3)] + [InlineData(new[] { 5, 4 }, 5, 1)] + [InlineData(new[] { 1 }, 5, 0)] + [InlineData(new[] { 5, 5, 5 }, 5, 3)] public void CountIntegers_ReturnsCount(int[] array, int countNumber, int expectedInstances) { Assert.Equal(expectedInstances, ((ReadOnlySpan)array.AsSpan()).Count(countNumber));