Skip to content

Commit df03c59

Browse files
use AsSpan method to convert array of floats to span
1 parent 8d117c9 commit df03c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/VectorData/SqliteVec/SqliteMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public TRecord MapFromStorageToDataModel(DbDataReader reader, bool includeVector
5656
}
5757

5858
var floats = new float[length / 4];
59-
var bytes = MemoryMarshal.Cast<float, byte>((Span<float>)floats);
59+
var bytes = MemoryMarshal.Cast<float, byte>(floats.AsSpan());
6060
stream.ReadExactly(bytes);
6161
#else
6262
var floats = MemoryMarshal.Cast<byte, float>((byte[])reader[ordinal]).ToArray();

0 commit comments

Comments
 (0)