Ameba: Fix Lint/UselessAssign

This commit is contained in:
syeopite
2024-07-17 12:39:40 -07:00
parent bad92093bf
commit fad0a4f52d
9 changed files with 7 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ struct YoutubeConnectionPool
@pool = build_pool()
end
def client(&block)
def client(&)
conn = pool.checkout
begin
response = yield conn

View File

@@ -109,7 +109,6 @@ private module Parsers
end
live_now = false
paid = false
premium = false
premiere_timestamp = item_contents.dig?("upcomingEventData", "startTime").try { |t| Time.unix(t.as_s.to_i64) }

View File

@@ -83,5 +83,5 @@ end
def extract_selected_tab(tabs)
# Extract the selected tab from the array of tabs Youtube returns
return selected_target = tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"]?.try &.as_bool)[0]["tabRenderer"]
return tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"]?.try &.as_bool)[0]["tabRenderer"]
end