Fix Performance/ChainedCallWithNoBang type of Ameba issues

This commit is contained in:
Sijawusz Pur Rahnama 2026-01-11 22:37:34 +01:00
parent b5b187ad88
commit e5a1131665
2 changed files with 2 additions and 2 deletions

View File

@ -482,7 +482,7 @@ module Invidious::Routes::API::V1::Authenticated
env.response.content_type = "text/event-stream"
raw_topics = env.params.body["topics"]? || env.params.query["topics"]?
topics = raw_topics.try &.split(",").uniq.first(1000)
topics = raw_topics.try &.split(",").uniq!.first(1000)
topics ||= [] of String
create_notification_stream(env, topics, CONNECTION_CHANNEL)

View File

@ -685,7 +685,7 @@ module YoutubeAPI
# Multiple encodings can be combined, and are listed in the order
# in which they were applied. E.g: "deflate, gzip" means that the
# content must be first "gunzipped", then "defated".
encodings.split(',').reverse.each do |enc|
encodings.split(',').reverse!.each do |enc|
case enc.strip(' ')
when "gzip"
body_io = Compress::Gzip::Reader.new(body_io, sync_close: true)