Use Enumerable#zip ftw

This commit is contained in:
Sijawusz Pur Rahnama 2022-11-23 16:16:34 +01:00
parent 1399aa3cdf
commit 6a180757f3

View file

@ -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