From 97d91ec0f87cc52f0e523e7d2a857bdf2b8f62ab Mon Sep 17 00:00:00 2001 From: JanEggers Date: Thu, 10 May 2018 19:30:29 +0200 Subject: [PATCH] fixed code quality issues --- Tests/MQTTnet.Benchmarks/SerializerBenchmark.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/MQTTnet.Benchmarks/SerializerBenchmark.cs b/Tests/MQTTnet.Benchmarks/SerializerBenchmark.cs index d343eb1..bcfff1c 100644 --- a/Tests/MQTTnet.Benchmarks/SerializerBenchmark.cs +++ b/Tests/MQTTnet.Benchmarks/SerializerBenchmark.cs @@ -18,7 +18,6 @@ namespace MQTTnet.Benchmarks [MemoryDiagnoser] public class SerializerBenchmark { - private MqttApplicationMessage _message; private MqttBasePacket _packet; private ArraySegment _serializedPacket; private MqttPacketSerializer _serializer; @@ -26,11 +25,11 @@ namespace MQTTnet.Benchmarks [GlobalSetup] public void Setup() { - _message = new MqttApplicationMessageBuilder() + var message = new MqttApplicationMessageBuilder() .WithTopic("A") .Build(); - _packet = _message.ToPublishPacket(); + _packet = message.ToPublishPacket(); _serializer = new MqttPacketSerializer(); _serializedPacket = _serializer.Serialize(_packet); } @@ -55,7 +54,7 @@ namespace MQTTnet.Benchmarks using (var bodyStream = new MemoryStream(Join(_serializedPacket), (int)headerStream.Position, header.BodyLength)) { - var deserializedPacket = _serializer.Deserialize(header, bodyStream); + _serializer.Deserialize(header, bodyStream); } } }