mirror of
https://github.com/iv-org/invidious
synced 2024-11-23 19:43:26 +01:00
Replace more * in macro with #splat
This commit is contained in:
parent
8ce91166d6
commit
ed8b84ed15
@ -93,7 +93,7 @@ struct ChannelVideo
|
||||
def to_tuple
|
||||
{% begin %}
|
||||
{
|
||||
{{*@type.instance_vars.map(&.name)}}
|
||||
{{@type.instance_vars.map(&.name).splat}}
|
||||
}
|
||||
{% end %}
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ struct ConfigPreferences
|
||||
def to_tuple
|
||||
{% begin %}
|
||||
{
|
||||
{{*@type.instance_vars.map { |var| "#{var.name}: #{var.name}".id }}}
|
||||
{{(@type.instance_vars.map { |var| "#{var.name}: #{var.name}".id }).splat}}
|
||||
}
|
||||
{% end %}
|
||||
end
|
||||
|
@ -95,7 +95,7 @@ end
|
||||
# -------------------
|
||||
|
||||
macro error_atom(*args)
|
||||
error_atom_helper(env, {{*args}})
|
||||
error_atom_helper(env, {{args.splat}})
|
||||
end
|
||||
|
||||
def error_atom_helper(env : HTTP::Server::Context, status_code : Int32, exception : Exception)
|
||||
|
Loading…
Reference in New Issue
Block a user