diff --git a/projects/RabbitMQ.Client/client/impl/AsyncEventingWrapper.cs b/projects/RabbitMQ.Client/client/impl/AsyncEventingWrapper.cs index 29f007b7c6..49e6c18aad 100644 --- a/projects/RabbitMQ.Client/client/impl/AsyncEventingWrapper.cs +++ b/projects/RabbitMQ.Client/client/impl/AsyncEventingWrapper.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using System.Threading.Tasks; using RabbitMQ.Client.Events; @@ -55,7 +54,7 @@ public Task InvokeAsync(object sender, T parameter) private readonly async Task InternalInvoke(Delegate[] handlers, object sender, T parameter) { - foreach (AsyncEventHandler action in handlers.Cast>()) + foreach (AsyncEventHandler action in handlers) { try { diff --git a/projects/RabbitMQ.Client/client/impl/EventingWrapper.cs b/projects/RabbitMQ.Client/client/impl/EventingWrapper.cs index 4017fb4052..f9a1a334cb 100644 --- a/projects/RabbitMQ.Client/client/impl/EventingWrapper.cs +++ b/projects/RabbitMQ.Client/client/impl/EventingWrapper.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; namespace RabbitMQ.Client.Impl { @@ -53,7 +52,7 @@ public void Invoke(object sender, T parameter) _handlers = handlers; } - foreach (EventHandler action in handlers.Cast>()) + foreach (EventHandler action in handlers) { try {