From 6a180757f3afb819ed353cc7432cc276e1f65d77 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Wed, 23 Nov 2022 16:16:34 +0100 Subject: [PATCH] Use `Enumerable#zip` ftw --- src/ameba/runner.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ameba/runner.cr b/src/ameba/runner.cr index 2f8ee72b..6023fcd6 100644 --- a/src/ameba/runner.cr +++ b/src/ameba/runner.cr @@ -88,8 +88,7 @@ module Ameba @formatter.started @sources channels = @sources.map { Channel(Exception?).new } - @sources.each_with_index do |source, idx| - channel = channels[idx] + @sources.zip(channels).each do |source, channel| spawn do run_source(source) rescue e