Skip to content

Commit fc7ec66

Browse files
committed
join NET7 => NET8
1 parent a635f6d commit fc7ec66

8 files changed

Lines changed: 10 additions & 15 deletions

File tree

src/RESPite/Internal/Raw.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private static uint FirstAndLast(char first, char last)
127127

128128
private static Vector256<uint> CreateUInt32(uint value)
129129
{
130-
#if NET7_0_OR_GREATER
130+
#if NET8_0_OR_GREATER
131131
return Vector256.Create<uint>(value);
132132
#else
133133
return Vector256.Create(value, value, value, value, value, value, value, value);

src/RESPite/Messages/RespReader.Span.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace RESPite.Messages;
1414
How we actually implement the underlying buffer depends on the capabilities of the runtime.
1515
*/
1616

17-
#if NET7_0_OR_GREATER && USE_UNSAFE_SPAN
17+
#if NET8_0_OR_GREATER && USE_UNSAFE_SPAN
1818

1919
public ref partial struct RespReader
2020
{

src/RESPite/Messages/RespReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ internal readonly T ParseChars<T, TState>(Parser<char, TState, T> parser, TState
910910
}
911911
}
912912

913-
#if NET7_0_OR_GREATER
913+
#if NET8_0_OR_GREATER
914914
/// <summary>
915915
/// Reads the current element using <see cref="ISpanParsable{TSelf}"/>.
916916
/// </summary>

src/StackExchange.Redis/Interfaces/IDatabase.VectorSets.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ bool VectorSetAdd(
162162
bool VectorSetSetAttributesJson(
163163
RedisKey key,
164164
RedisValue member,
165-
#if NET7_0_OR_GREATER
165+
#if NET8_0_OR_GREATER
166166
[StringSyntax(StringSyntaxAttribute.Json)]
167167
#endif
168168
string attributesJson,

src/StackExchange.Redis/Interfaces/IDatabaseAsync.VectorSets.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Task<bool> VectorSetAddAsync(
8181
Task<bool> VectorSetSetAttributesJsonAsync(
8282
RedisKey key,
8383
RedisValue member,
84-
#if NET7_0_OR_GREATER
84+
#if NET8_0_OR_GREATER
8585
[StringSyntax(StringSyntaxAttribute.Json)]
8686
#endif
8787
string attributesJson,

src/StackExchange.Redis/VectorSetAddRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal VectorSetAddRequest()
2424
public static VectorSetAddRequest Member(
2525
RedisValue element,
2626
ReadOnlyMemory<float> values,
27-
#if NET7_0_OR_GREATER
27+
#if NET8_0_OR_GREATER
2828
[StringSyntax(StringSyntaxAttribute.Json)]
2929
#endif
3030
string? attributesJson = null)

src/StackExchange.Redis/VectorSetSimilaritySearchResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ public readonly struct VectorSetSimilaritySearchResult(RedisValue member, double
2323
/// <summary>
2424
/// The JSON attributes associated with the member when WITHATTRIBS is used, null otherwise.
2525
/// </summary>
26-
#if NET7_0_OR_GREATER
26+
#if NET8_0_OR_GREATER
2727
[StringSyntax(StringSyntaxAttribute.Json)]
28-
#endif
2928
public string? AttributesJson { get; } = attributesJson;
3029

3130
/// <inheritdoc/>

tests/RESPite.Tests/RespReaderTests.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,12 @@ public void BlobString(RespPayload payload)
155155
Assert.Equal("hello world", reader.ReadString());
156156
Assert.Equal("hello world", reader.ReadString(out var prefix));
157157
Assert.Equal("", prefix);
158-
#if NET7_0_OR_GREATER
158+
#if NET8_0_OR_GREATER
159159
Assert.Equal("hello world", reader.ParseChars<string>());
160-
#endif
161160
/* interestingly, string does not implement IUtf8SpanParsable
162-
#if NET8_0_OR_GREATER
163161
Assert.Equal("hello world", reader.ParseBytes<string>());
164-
#endif
165162
*/
163+
#endif
166164
reader.DemandEnd();
167165
}
168166

@@ -220,12 +218,10 @@ public void Number(RespPayload payload)
220218
Assert.Equal(1234, reader.ReadInt32());
221219
Assert.Equal(1234D, reader.ReadDouble());
222220
Assert.Equal(1234M, reader.ReadDecimal());
223-
#if NET7_0_OR_GREATER
221+
#if NET8_0_OR_GREATER
224222
Assert.Equal(1234, reader.ParseChars<int>());
225223
Assert.Equal(1234D, reader.ParseChars<double>());
226224
Assert.Equal(1234M, reader.ParseChars<decimal>());
227-
#endif
228-
#if NET8_0_OR_GREATER
229225
Assert.Equal(1234, reader.ParseBytes<int>());
230226
Assert.Equal(1234D, reader.ParseBytes<double>());
231227
Assert.Equal(1234M, reader.ParseBytes<decimal>());

0 commit comments

Comments
 (0)