Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ameba: Fix unused argument Lint warnings #4805

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/invidious/routes/account.cr
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module Invidious::Routes::Account
return error_template(401, "Password is a required field")
end

new_passwords = env.params.body.select { |k, v| k.match(/^new_password\[\d+\]$/) }.map { |k, v| v }
new_passwords = env.params.body.select { |k, _| k.match(/^new_password\[\d+\]$/) }.map { |_, v| v }

if new_passwords.size <= 1 || new_passwords.uniq.size != 1
return error_template(400, "New passwords must match")
Expand Down Expand Up @@ -240,7 +240,7 @@ module Invidious::Routes::Account
return error_template(400, ex)
end

scopes = env.params.body.select { |k, v| k.match(/^scopes\[\d+\]$/) }.map { |k, v| v }
scopes = env.params.body.select { |k, _| k.match(/^scopes\[\d+\]$/) }.map { |_, v| v }
callback_url = env.params.body["callbackUrl"]?
expire = env.params.body["expire"]?.try &.to_i?

Expand Down
4 changes: 2 additions & 2 deletions src/invidious/yt_backend/connection_pool.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct YoutubeConnectionPool
@pool = build_pool()
end

def client(&block)
def client(&)
conn = pool.checkout
begin
response = yield conn
Expand Down Expand Up @@ -69,7 +69,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false)
return client
end

def make_client(url : URI, region = nil, force_resolve : Bool = false, &block)
def make_client(url : URI, region = nil, force_resolve : Bool = false, &)
client = make_client(url, region, force_resolve)
begin
yield client
Expand Down
2 changes: 1 addition & 1 deletion src/invidious/yt_backend/extractors.cr
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ end
#
# This function yields the container so that items can be parsed separately.
#
def extract_items(initial_data : InitialData, &block)
def extract_items(initial_data : InitialData, &)
if unpackaged_data = initial_data["contents"]?.try &.as_h
elsif unpackaged_data = initial_data["response"]?.try &.as_h
elsif unpackaged_data = initial_data.dig?("onResponseReceivedActions", 1).try &.as_h
Expand Down
Loading