Skip to content

Commit 61388dd

Browse files
committed
Remove redundant compilation conditionals
1 parent c2fb492 commit 61388dd

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/JsonApiDotNetCore/Serialization/Response/FingerprintGenerator.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ namespace JsonApiDotNetCore.Serialization.Response;
66
/// <inheritdoc cref="IFingerprintGenerator" />
77
internal sealed class FingerprintGenerator : IFingerprintGenerator
88
{
9-
#if NET6_0
10-
private static readonly byte[] Separator = Encoding.UTF8.GetBytes("|");
11-
#else
129
private static readonly byte[] Separator = "|"u8.ToArray();
13-
#endif
1410
private static readonly uint[] LookupTable = Enumerable.Range(0, 256).Select(ToLookupEntry).ToArray();
1511

1612
private static uint ToLookupEntry(int index)

test/NoEntityFrameworkTests/NullSafeExpressionRewriterTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ namespace NoEntityFrameworkTests;
1010

1111
public sealed class NullSafeExpressionRewriterTests
1212
{
13+
private const nint OnePointer = 1;
14+
1315
[Fact]
1416
public void Can_rewrite_where_clause_with_constant_comparison()
1517
{
@@ -498,11 +500,7 @@ public void Can_rewrite_order_by_clause_with_IntPtr()
498500
Parent = new TestResource
499501
{
500502
Id = generator.GetNext(),
501-
#if NET6_0
502-
Pointer = (IntPtr)1
503-
#else
504-
Pointer = 1
505-
#endif
503+
Pointer = OnePointer
506504
}
507505
}
508506
};

0 commit comments

Comments
 (0)