Skip to content

Commit 24c15dc

Browse files
committed
Fix build
1 parent 6fc58a5 commit 24c15dc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

projects/RabbitMQ.Client/client/impl/WireFormatting.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
using System;
3333
using System.Collections;
3434
using System.Collections.Generic;
35+
using System.Runtime.CompilerServices;
3536
using System.Text;
3637

3738
using RabbitMQ.Client.Exceptions;
@@ -72,6 +73,7 @@ internal DecimalData(uint flags, uint hi, uint lo, uint mid)
7273
[MethodImpl(MethodImplOptions.AggressiveInlining)]
7374
public static decimal ReadDecimal(ReadOnlySpan<byte> span)
7475
{
76+
byte scale = span[0];
7577
if (scale > 28)
7678
{
7779
ThrowInvalidDecimalScale(scale);
@@ -120,13 +122,6 @@ public static IList ReadArray(ReadOnlySpan<byte> span, out int bytesRead)
120122
return array;
121123
}
122124

123-
public static decimal ReadDecimal(ReadOnlySpan<byte> span)
124-
{
125-
byte scale = span[0];
126-
uint unsignedMantissa = NetworkOrderDeserializer.ReadUInt32(span.Slice(1));
127-
return AmqpToDecimal(scale, unsignedMantissa);
128-
}
129-
130125
public static object ReadFieldValue(ReadOnlySpan<byte> span, out int bytesRead)
131126
{
132127
bytesRead = 1;

0 commit comments

Comments
 (0)