Skip to content

Commit 7269e9b

Browse files
committed
formatting
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 0b6c257 commit 7269e9b

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

RabbitMQ.AMQP.Client/Utils.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ internal static Attach CreateAttach(string? address,
191191
{
192192
return PercentCodec.EncodePathSegment(url);
193193
}
194-
194+
195195
internal static string? DecodePathSegment(string url)
196196
{
197197
return PercentCodec.DecodePathSegment(url);
@@ -379,7 +379,7 @@ static PercentCodec()
379379
s_unreserved['_'] = true;
380380
s_unreserved['~'] = true;
381381
}
382-
382+
383383
private static int HexValue(char ch)
384384
{
385385
return ch switch
@@ -391,14 +391,13 @@ private static int HexValue(char ch)
391391
};
392392
}
393393

394-
395394
internal static string? DecodePathSegment(string? segment)
396395
{
397396
if (segment == null)
398397
{
399398
return null;
400399
}
401-
400+
402401
var bytes = new List<byte>(segment.Length);
403402
for (int i = 0; i < segment.Length; i++)
404403
{
@@ -409,14 +408,14 @@ private static int HexValue(char ch)
409408
{
410409
throw new FormatException("Invalid percent-encoding: incomplete escape sequence.");
411410
}
412-
411+
413412
int hi = HexValue(segment[i + 1]);
414413
int lo = HexValue(segment[i + 2]);
415414
if (hi < 0 || lo < 0)
416415
{
417416
throw new FormatException($"Invalid percent-encoding: '{segment.Substring(i, 3)}'.");
418417
}
419-
418+
420419
bytes.Add((byte)((hi << 4) | lo));
421420
i += 2;
422421
}
@@ -433,12 +432,10 @@ private static int HexValue(char ch)
433432
}
434433
}
435434
}
436-
435+
437436
return Encoding.UTF8.GetString(bytes.ToArray());
438437
}
439-
440-
441-
438+
442439
internal static string? EncodePathSegment(string? segment)
443440
{
444441
if (segment == null)

Tests/DirectReply/DirectReplyTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public async Task ValidateDirectReplyQName()
3030
Assert.Contains("amq.rabbitmq.reply-to", consumer.Queue);
3131
}
3232

33-
3433
[Fact]
3534
public async Task UseDirectReplyToReceiveAMessage()
3635
{

0 commit comments

Comments
 (0)