Commit a7d7eefc authored by Karl Seguin's avatar Karl Seguin

eliminate warnings for generated structs of empty messages

parent d93bde97
Pipeline #95 passed with stage
in 1 minute and 22 seconds
......@@ -44,8 +44,8 @@ defmodule <%= context.namespace %><%= name %> do
<% last_index = Enum.count(fields) %>
@spec encode_to_iodata!(t | map) :: iodata
def encode_to_iodata!(data) do
alias Elixir.Pbuf.Encoder
def encode_to_iodata!(<%= if last_index == 0 do %>_<% end %>data) do
<%= if last_index != 0 do %>alias Elixir.Pbuf.Encoder<% end %>
[
<%= for {field, i} <- Enum.with_index(fields) do %>
<%= field.encode_fun %><%= if_neq(i, last_index, ",") %>
......
defmodule Pbuf.MixProject do
use Mix.Project
@version "0.1.0"
@version "0.1.1"
def project do
[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment