From da961be09bfc72bb9be3d7f614dc1908863baef3 Mon Sep 17 00:00:00 2001 From: Mogens Heller Grabe Date: Wed, 10 Apr 2024 11:02:41 +0200 Subject: [PATCH] using --- Rebus.Tests/Routing/TestDefaultReturnAddress.cs | 4 +++- Rebus/Retry/Simple/DefaultRetryStep.cs | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Rebus.Tests/Routing/TestDefaultReturnAddress.cs b/Rebus.Tests/Routing/TestDefaultReturnAddress.cs index 55d4a65d3..e9703e771 100644 --- a/Rebus.Tests/Routing/TestDefaultReturnAddress.cs +++ b/Rebus.Tests/Routing/TestDefaultReturnAddress.cs @@ -9,6 +9,7 @@ using Rebus.Tests.Contracts; using Rebus.Tests.Contracts.Extensions; using Rebus.Transport.InMem; +// ReSharper disable AccessToDisposedClosure #pragma warning disable 1998 namespace Rebus.Tests.Routing; @@ -32,7 +33,8 @@ public async Task AssignsDefaultReturnAddressOnSentMessage() var receiver = Using(new BuiltinHandlerActivator()); var returnAddress = ""; - var done = new ManualResetEvent(false); + + using var done = new ManualResetEvent(false); receiver.Handle(async (bus, context, message) => { diff --git a/Rebus/Retry/Simple/DefaultRetryStep.cs b/Rebus/Retry/Simple/DefaultRetryStep.cs index 4124b0d38..3691dd548 100644 --- a/Rebus/Retry/Simple/DefaultRetryStep.cs +++ b/Rebus/Retry/Simple/DefaultRetryStep.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -using Rebus.Bus; using Rebus.Exceptions; using Rebus.Extensions; using Rebus.Logging;