Small .NET optimizations

This commit is contained in:
2025-02-03 22:29:42 +01:00
parent 9270f49519
commit 980dab22f3
7 changed files with 45 additions and 36 deletions

View File

@@ -71,7 +71,7 @@ namespace AMWD.Protocols.Modbus.Common.Protocols
public DeviceIdentificationRaw DeserializeReadDeviceIdentification(IReadOnlyList<byte> response)
{
if (!_devices.TryGetValue(response[0], out var device))
if (!_devices.TryGetValue(response[0], out var _))
throw new TimeoutException("Device not found.");
var result = new DeviceIdentificationRaw