Replace more * in macro with #splat

This commit is contained in:
syeopite 2023-11-08 00:49:37 -08:00
parent 8ce91166d6
commit ed8b84ed15
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
3 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ struct ChannelVideo
def to_tuple def to_tuple
{% begin %} {% begin %}
{ {
{{*@type.instance_vars.map(&.name)}} {{@type.instance_vars.map(&.name).splat}}
} }
{% end %} {% end %}
end end

View File

@ -48,7 +48,7 @@ struct ConfigPreferences
def to_tuple def to_tuple
{% begin %} {% begin %}
{ {
{{*@type.instance_vars.map { |var| "#{var.name}: #{var.name}".id }}} {{(@type.instance_vars.map { |var| "#{var.name}: #{var.name}".id }).splat}}
} }
{% end %} {% end %}
end end

View File

@ -95,7 +95,7 @@ end
# ------------------- # -------------------
macro error_atom(*args) macro error_atom(*args)
error_atom_helper(env, {{*args}}) error_atom_helper(env, {{args.splat}})
end end
def error_atom_helper(env : HTTP::Server::Context, status_code : Int32, exception : Exception) def error_atom_helper(env : HTTP::Server::Context, status_code : Int32, exception : Exception)